"Fossies" - the Fresh Open Source Software Archive 
Member "node-runner-0.6.0/etc/mysql.inc" (29 Jul 2004, 720 Bytes) of package /linux/www/old/node-runner-0.6.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) fasm source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "mysql.inc" see the
Fossies "Dox" file reference documentation.
1 <?php
2 // Intended to serve as database abstraction layer for MySQL
3 // Limited to functions required by Node Runner
4 // Global variables from nr.inc
5
6 function db_connect() {
7 global $dbhost,$dbuser,$dbpass;
8 $connect = mysql_connect($dbhost,$dbuser,$dbpass);
9 if (!$connect) {
10 echo mysql_error();
11 }
12 return $connect;
13 }
14
15 function db_query($qstring) {
16 global $db;
17 $query = mysql_db_query($db,$qstring);
18 if (!$query) {
19 echo mysql_error();
20 }
21 return $query;
22 }
23
24 function db_num_rows($qhandle) {
25 // return only if qhandle exists, otherwise 0
26 if ($qhandle) {
27 return @mysql_num_rows($qhandle);
28 } else {
29 return 0;
30 }
31 }
32
33 function db_fetch_array($qhandle) {
34 return @mysql_fetch_array($qhandle);
35 }
36
37 ?>