View Single Post
05-18-2008, 12:54 AM
Join Date: Apr 2007
Originally Posted by
It doesn't, have a look at
PHP: mysql_result - Manual
. It should return as an array yes, but try write "print_r($result);" instead of "print $result;", since
can't handle arrays (which
was made for).
A quick response to the quoted post (whilst waiting for the OP to get back to us), here are some comments to chew on.
The initial statement is correct, VI said that
three arguments; it doesn't, only requires two arguments with the third field name/offset being optional. I think there may be some confusion over what this function does. The manual
clear that up for anyone not quite clear.
However from that point onwards the post strays a little. I'm going to assume that "it" (in "
It should return as an array
") references the return value of the
method as that seems most appropriate. It should not be returning an array at all since the method is
. Since the method will only return FALSE or the row-column value there's no need in this case to use
as they will behave similarly. That said, in general, functions like
are useful tools for taking a peek at things. If "it" refers to the local variable within
there's again no reason to assume that it should be an array, it's likely not to be one if the class architecture is anything resembling useful.
If you're talking about
returning an array, I've no idea where you got that notion.
can "handle" arrays (in that it doesn't return an error) by doing its job of printing a string representation of the argument (
OP, please chime in with some responses.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe