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 a heap table?
What is a storage engine?
How to calculate the difference between two time values?
Does insert statement lock the table?
What is the difference between CHAR and VARCHAR data types?
What is pragma autonomous_transaction?
Which command is used to view the content of the table in mysql?
What is the default port number of mysql?
How does mysql store data?
What is blob in mysql?
What are the purposes of using enum and set data types?
How do you stop an access query?