Changeset 35 for trunk/update_notice.php
- Timestamp:
- Apr 8, 2018, 4:41:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/update_notice.php
r34 r35 92 92 // "none" - present in both and messages identical (no DB update). 93 93 94 $noteLink = mysql _connect( $dbhost, $dbuser, $dbpassw);94 $noteLink = mysqli_connect( $dbhost, $dbuser, $dbpassw, $notice_db ); 95 95 96 if ( ! mysql_select_db( $notice_db, $noteLink ))96 if ( ! $noteLink ) 97 97 { 98 echo "Could not select DB $notice_db - " . mysql_error() . "\n";98 echo "Could not connect to DB $notice_db - " . mysqli_error($noteLink) . "\n"; 99 99 exit(); 100 100 } … … 102 102 $query = "SELECT id, type, revision, message FROM notice"; 103 103 104 $result = mysql _query( $query, $noteLink)105 or die( "Query failed : $query<br />" . mysql _error() );104 $result = mysqli_query( $noteLink, $query ) 105 or die( "Query failed : $query<br />" . mysqli_error($noteLink) ); 106 106 107 107 echo "=====START of DB QUERY LOOP===== \n"; 108 $num_rows = mysql _num_rows( $result );108 $num_rows = mysqli_num_rows( $result ); 109 109 110 110 echo " numrows = $num_rows \n"; 111 while ( list( $id, $type, $rev, $msg ) = mysql _fetch_array( $result ) )111 while ( list( $id, $type, $rev, $msg ) = mysqli_fetch_array( $result ) ) 112 112 { 113 113 $key = $type . $rev; … … 180 180 echo " query: [ $query ] \n"; 181 181 182 $result = mysql _query( $query, $noteLink)183 or die( "Query failed : $query<br />" . mysql _error() );182 $result = mysqli_query( $noteLink, $query ) 183 or die( "Query failed : $query<br />" . mysqli_error($noteLink) ); 184 184 185 185 }
Note:
See TracChangeset
for help on using the changeset viewer.