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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -