php - Error with mysql_fetch_object -
in log see next error
mysql_fetch_object(): supplied argument not valid mysql result resource in mysql.class.php on line 37
here code line 37
function findpole1($id,$table){ mysql_connect($globals["hostname"],$globals["username"],$globals["password"]) or die(""); $result=mysql_db_query($globals["dbname"],"select * $table id='$id'"); //*****************line38******************************** $find=mysql_fetch_row($result); echo $find[2]; }
and part of code mysql_fetch_object in same file
static function query($sql,$default=0){ if ($default==1) { echo '<div style="border: solid 1px red">'.$sql.'</div>'; } $result=mysql_query($sql); $a=array(); while ($obj = mysql_fetch_object($result)) { $a[]=$obj; } return $a; }
please me check error
Comments
Post a Comment