Jump to content


This topic is now archived and is closed to further replies.


retrieving and displaying a specific data from a database?

Recommended Posts

hi, guys

i'm trying to display a record with the following condition & codes below;
$sql->QueryRow("select * from photos where photo_filename = $cur_file");
$row = $sql->data;

$max_array = count($row);

echo $row[id];

but these codes threw me an error message here;
Fatal error: Call to a member function on a non-object in /home/askjames/public_html/mygallery/img_info.php on line 30

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.

Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.