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 the difference between MyISAM and INNO DB in MySQL with the Advantage and disadvantage
What is the difference between unix timestamps and mysql timestamps?
how to show all records starting with the letters 'sonia' and the phone number '9876543210' limit to records 1 through 5.
I want to make a query where I want to eliminate the duplicate rows from the table. For example : Input : Table : NAME Column1 Column2 India USA USA India UK India India UK The desired output that I want to eliminate the duplicates Output India USA UK India Thanks
Is mysql port 3306 tcp or udp?
Is sql similar to mysql?
In how many ways we can retrieve the data in the result set of MySQL using PHP? What is the difference between mysql_fetch_object and mysql_fetch_array ?
What is mysqli_free_result?
What is blob datatype in mysql?
How do I disable mysql?
How do I delete a row in mysql?
What is orm in mysql?