What are the differences between MySQL_fetch_array(),
MySQL_fetch_object(), MySQL_fetch_row()?
Answers were Sorted based on User's Feedback
Answer / amita
mysql_fetch_object will return result from database as
objects i.e. $result->name
mysql_fetch_array will fetch result row as an associative
array or numeric array or both with the help of mysql_NUM or
mysql_ASSOC option.
eg: $result[0] ,$result['name']
mysql_fetch_row will fetch result row as an numeric array.
eg: $result[0]
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / vel
when u r using mysql_fetch_object i will first matching
record.
u can access the result set by column name of that record.
when u r using mysql_fetch_array i will fetch all the
matching records from the table.
u can access the result set by index as well as colum name
of that record.
Is This Answer Correct ? | 3 Yes | 0 No |
What is mysql in dbms?
What is localhost in mysql?
using primary can we relate two table, with out foreign key?
State the differences between mongodb and mysql.
How to update database permissions/privilages.
What is the difference between mysql_fetch_assoc and mysql_fetch_array?
What is mysql optimization?
What is slow query log in mysql?
Why do we need mysql?
How to use regular expression in pattern match conditions?
How set mysql root password?
What is check constraint?