--- branches/paul/db_connect.php 2004/03/18 19:24:54 67 +++ branches/paul_xx/db_connect.php 2004/03/18 20:01:09 69 @@ -7,17 +7,17 @@ // Establish a connection to the database server or bail out. -$db_link = @mysql_connect ($db_server, $db_user, $db_password) +$db_link = @xx_connect ($db_server, $db_user, $db_password) or die ( "ERROR: Could not connect to the database server." ); // Switch to the selected database name or bail out. -$db_switch = @mysql_select_db ($db_name, $db_link ) +$db_switch = @xx_select_db ($db_name, $db_link ) or die ( "ERROR: Could not connect to the database." ); /********************************************************** -Function: mysql_tryquery($querystring) +Function: xx_tryquery($querystring) Author: Paul Bramscher Last Modified: 03.02.2004 *********************************************************** @@ -35,13 +35,13 @@ queries. If the $db_debug mode below is toggled on (1), then additional error reporting is displayed. **********************************************************/ -function mysql_tryquery($querystring) { +function xx_tryquery($querystring) { // Database debug mode $db_debug = 0; // Determine whether the query was successful - $db_resource = @mysql_query($querystring); + $db_resource = @xx_query($querystring); // Success. if ($db_resource) { @@ -55,12 +55,12 @@ if ($db_debug == 1) { printf("
DATABASE ERROR DEBUGGING

\n"); printf("mySQL error:
\n(#%s) %s

\n", - mysql_errno(), mysql_error()); + xx_errno(), xx_error()); printf("Attempted query:
\n%s
\n", $querystring); } // Gracefully end the HTML stream - @mysql_query ("UNLOCK TABLES"); + @xx_query ("UNLOCK TABLES"); die ("
The database is experiencing problems.\n" ); }