Changeset 5230 for trunk/include/dblayer
- Timestamp:
- Mar 21, 2010, 10:15:54 PM (15 years ago)
- Location:
- trunk/include/dblayer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/dblayer/functions_mysql.inc.php
r5196 r5230 33 33 */ 34 34 35 function pwg_db_connect($host, $user, $password, $database )35 function pwg_db_connect($host, $user, $password, $database=null, $die=true) 36 36 { 37 $link = mysql_connect($host, $user, $password) or my_error('mysql_connect', false); 38 mysql_select_db($database, $link) or my_error('mysql_select_db', false); 37 $link = @mysql_connect($host, $user, $password) or my_error('mysql_connect', $die); 39 38 40 39 return $link; 40 } 41 42 function pwg_select_db($database, $link, $die=true) 43 { 44 return @mysql_select_db($database, $link) or my_error('mysql_select_db', $die); 41 45 } 42 46 -
trunk/include/dblayer/functions_pdo-sqlite.inc.php
r5196 r5230 34 34 */ 35 35 36 function pwg_db_connect($host, $user, $password, $database )36 function pwg_db_connect($host, $user, $password, $database, $die=true) 37 37 { 38 38 global $conf; … … 43 43 $link = new PDO($db_file); 44 44 } catch (Exception $e) { 45 my_error('sqlite::open', true);45 my_error('sqlite::open', $die); 46 46 } 47 47 … … 55 55 56 56 return $link; 57 } 58 59 function pwg_select_db($database=null, $link=null, $die=null) 60 { 61 return true; 57 62 } 58 63 -
trunk/include/dblayer/functions_pgsql.inc.php
r5196 r5230 34 34 */ 35 35 36 function pwg_db_connect($host, $user, $password, $database )36 function pwg_db_connect($host, $user, $password, $database, $die=true) 37 37 { 38 38 $connection_string = ''; … … 50 50 $password, 51 51 $database); 52 $link = pg_connect($connection_string) or my_error('pg_connect', false);52 $link = pg_connect($connection_string) or my_error('pg_connect', $die); 53 53 54 54 return $link; 55 } 56 57 function pwg_select_db($database=null, $link=null, $die=null) 58 { 59 return true; 55 60 } 56 61 -
trunk/include/dblayer/functions_sqlite.inc.php
r5196 r5230 34 34 */ 35 35 36 function pwg_db_connect($host, $user, $password, $database )36 function pwg_db_connect($host, $user, $password, $database, $die=true) 37 37 { 38 38 global $conf; … … 51 51 $link = new SQLite3($db_file, $sqlite_open_mode); 52 52 } catch (Exception $e) { 53 my_error('sqlite::open', true);53 my_error('sqlite::open', $die); 54 54 } 55 55 … … 63 63 64 64 return $link; 65 } 66 67 function pwg_select_db($database=null, $link=null, $die=null) 68 { 69 return true; 65 70 } 66 71
Note: See TracChangeset
for help on using the changeset viewer.