#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Rochester, NY, United States
    Posts
    9
    Rep Power
    0
    I am searching a table and I am sure that sometimes the result will be more than one... is it safe to assume that using MYSQL_FETCH_OBJECT i would be able to do the following:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    $myResults = MYSQL_FETCH_OBJECT();
    $size = COUNT($myResults);
    ECHO $myResults[0]->Name;
    .
    .
    ECHO $myResults[100]->Name;
    [/code]

    - Regards,
    Adam
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Rochester, NY, United States
    Posts
    9
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    $i = 0;
    while ($ret_list[$i] = MYSQL_FETCH_OBJECT($result)) {
    $i++;
    }
    return $ret_list;
    [/code]

    that is exactly what I want to do... does anyone see any potential problems with this?

    - Regards
    Adam

IMN logo majestic logo threadwatch logo seochat tools logo