It all depends on you, I basically get used on using mysql_fetch_array which
returns an associative array.
example:
$result = mysql_query("SELECT name, lastname, age FROM table");
$ra = mysql_fetch_array($result);
or
$ro = mysql_fetch_object($result);
or
$rr = mysql_fetch_row($result);

now:
echo "name is :" . $ra["name"]; // array
(same as: echo "name is:" . $ra[0];
or
echo "name is:" . $ro->name; // object
or
echo "name is:" .$rr[0];

.
.
.
just like the mysql_fetch_array() cause it returns both enumarated and
associative array.

"Kevin" <[EMAIL PROTECTED]> wrote in message
001001c12700$255cb340$503ffea9@kl">news:001001c12700$255cb340$503ffea9@kl...
> I have been coding php for a while now but can't seem to get a grasp on
> which type of query I should use for a given situation.
>
> mysql_fetch_array
> mysql_fetch_object
> mysql_fetch_row
>
> Perhaps there is no right answer or perhaps the answer comes with
> experience.  In any case, I would love to get some pointers.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to