bilis_money Posted July 3, 2006 Share Posted July 3, 2006 hi, guysi'm trying to display a record with the following condition & codes below;[code]$sql->QueryRow("select * from photos where photo_filename = $cur_file");$row = $sql->data;$max_array = count($row);echo $row[id];[/code]but these codes threw me an error message here;[quote]Fatal error: Call to a member function on a non-object in /home/askjames/public_html/mygallery/img_info.php on line 30[/quote]and line 30 is the first line of codes above and so on...$cur_file is the name of the current .gif file in the directory.what do you think is the reason of this error message?please help me to figure out this?thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/13518-retrieving-and-displaying-a-specific-data-from-a-database/ Share on other sites More sharing options...
Brandon Jaeger Posted July 3, 2006 Share Posted July 3, 2006 $sql = new sql; // or whatever the class' name isPut that above the line with the error. Quote Link to comment https://forums.phpfreaks.com/topic/13518-retrieving-and-displaying-a-specific-data-from-a-database/#findComment-52356 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.