www.webdeveloper.com
Results 1 to 2 of 2

Thread: error message type stdClass

  1. #1
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197

    error message type stdClass

    Hi the below is giving this error message

    Fatal error: Cannot use object of type stdClass as array in C:\Program Files\xampp\htdocs\familyclick\photos\myPhotos.php on line 125

    any thoughts why, I used the same code formate for other queries except its done in a table and not a div

    any help is excellent

    PHP Code:
    $result = mysql_query("SELECT * FROM image_files WHERE user_id = '$user_id'") or die("Can't Perform Query");

    while ($row=mysql_fetch_object($result))
    {?>
    <div class="thumb">
    <img src="../user_images/<?php echo $row['image_name'];?>" height="75" width="75" />
    </div>
    <div class="clear"></div>
    <?php ?>
    Kevin

  2. #2
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    got it this was wrong


    while ($row=mysql_fetch_object($result))

    should be

    while ($row=mysql_fetch_array($result))
    Kevin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles