Changeset 597 for trunk/inc/db.php
- Timestamp:
- May 20, 2009, 12:52:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/db.php
r591 r597 2 2 3 3 include('config.php'); 4 include('database.php'); 4 5 5 $db = new mysqli($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']);6 if(mysqli_connect_err no())6 $db = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); 7 if(mysqli_connect_error()) 7 8 { 8 die('Přihlášení k MySQLselhalo. '.mysqli_connect_error());9 die('Přihlášení k databázi selhalo. '.mysqli_connect_error()); 9 10 } 10 $db-> query('SET NAMES '.$Config['Database']['Charset']);11 $db->charset($Config['Database']['Charset']); 11 12 12 13 ?>
Note:
See TracChangeset
for help on using the changeset viewer.