/[libdata]/trunk/include/db_connect.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/include/db_connect.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by dpavlin, Thu Mar 4 21:18:33 2004 UTC revision 42 by dpavlin, Thu Mar 4 22:43:50 2004 UTC
# Line 16  Line 16 
16      /****************************************************************/      /****************************************************************/
17    
18      /* establish a connection to the database or bailout */      /* establish a connection to the database or bailout */
19      $con = mysql_connect ( $db_srv, $db_usr, $db_pwd )      $con = xx_connect ( $db_srv, $db_usr, $db_pwd )
20          or die ( "ERROR: Could not connect to database server!" );          or die ( "ERROR: Could not connect to database server!" );
21      $result = mysql_select_db ( $db_nam, $con )      $result = xx_select_db ( $db_nam, $con )
22          or die ( "ERROR: Could not connect to database!" );          or die ( "ERROR: Could not connect to database!" );
23    
24      /****************************************************************/      /****************************************************************/
# Line 29  Line 29 
29      /* return an error message from a failed sql query */      /* return an error message from a failed sql query */
30      function sql_err ( $p_sql ) {      function sql_err ( $p_sql ) {
31          printf ( "ERROR: Query failed.<br>%s<br>%s: %s<br>\n",          printf ( "ERROR: Query failed.<br>%s<br>%s: %s<br>\n",
32                   $p_sql, mysql_errno(), mysql_error() );                   $p_sql, xx_errno(), xx_error() );
33          return 1;          return 1;
34      }      }
35    

Legend:
Removed from v.31  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26