Could some one please check the following code and guesstimate where am I
 wrong ?
 (the only thing I got from browser is: Fatal error: Call to undefined
 function: fetchrow() pc_list.php on line 14, but on that line I have
 fetchRow() not fetchrow(). To make it worse even when I am replacing
 fetchRow() with FetchRow the same error is reported)

 PS. I used PEAR that comes with php-4.1.1 and php-4.0.4pl1. nothing changed

 require_once "DB.php" ;

 $db = DB::connect("$db_type://$db_user:$db_pass@$db_host/$db_name",
 $db_pipe) ;
 $req = "SELECT pc.hostname, m.logo, pc.mac, pc.ip FROM computer pc, mac m
 WHERE = LEFT(pc.mac) " ;

 $p_req = $db->prepare($req) ;
 $res = $db->execute($p_req) ;

 echo " <table border=1> \n" ;
 echo " <tr> <th> Hostname </th> <th> Logo </th> <th> MAC </th> <th> IP
 </tr>\n" ;

 $counter = 0 ;
 while ( $arr=$res->fetchRow() ) {
         echo " <tr> <td> $arr[0] </td> <td> <img src=\"logos/$arr[1]\">
 </td> " ;
         echo " <td> $arr[2] </td> <td> $arr[3] </td> </tr> \n" ;
         $counter++ ;

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to