Log in

View Full Version : mysql_fetch_row


christec
02-16-2002, 08:46 PM
I would like to know if there is a

$DB_site->something

that is equivalent to this

mysql_fetch_row($result)

I didn't see anything in the db_mysql.php file.

Thanks :)

JamesUS
02-17-2002, 07:52 AM
No there isn't.
I've never used fetch_row but presumably it just gets one row?

If so, then you can use this:
$row = $DB_site->query_first("SELECT ....");
That will run the query and then return only the first row.

Admin
02-17-2002, 10:30 AM
You can use $DB_site->fetch_array()...

christec
02-17-2002, 01:28 PM
Guys,

Thanks for your replies, I figured out that I could use $DB_site->fetch_array() (mysql_fetch_array)

For anyone who is interested here is the php.net definition.

mysql_fetch_row = Get a result row as an enumerated array

mysql_fetch_array = Fetch a result row as an associative array, a numeric array, or both.