What is the difference between mysql_fetch_array and
mysql_fetch_object?

Answers were Sorted based on User's Feedback



What is the difference between mysql_fetch_array and mysql_fetch_object?..

Answer / subrat

mysql_fetch_array ? Fetch a result row as an associative
ARRAY, a numeric array, or both
mysql_fetch_object ? Fetch a result row as an OBJECT

Is This Answer Correct ?    25 Yes 2 No

What is the difference between mysql_fetch_array and mysql_fetch_object?..

Answer / sumit

mysql_fetch_object : will return the results from database
as objects. fields will be accessible like an objects
i.e $result->name

mysql_fetch_array : will return the results from database as
array. fields will be accessible like in objects
i.e $result[name]

Is This Answer Correct ?    5 Yes 1 No

What is the difference between mysql_fetch_array and mysql_fetch_object?..

Answer / jeevabala

mysql_fetch_array : fetch the result as an array
mysql_fetch_object : fetch the result as a object

Is This Answer Correct ?    1 Yes 0 No

What is the difference between mysql_fetch_array and mysql_fetch_object?..

Answer / abhay kumar

mysql_fetch_array display all matching record from table as
an array while mysql_fetch_object dispaly first matching
from table as ab object

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More MySQL Interview Questions

How do I copy a table in mysql?

1 Answers  


how fastest access of data can be done from database ?

3 Answers  


Explain about reporting services of MYSQL?

1 Answers  


How many primary keys can be there in a table?

1 Answers  


Give the syntax of GRANT commands?

3 Answers  


write a query to mysql in safe mode and to change the root password

1 Answers  


What are the indexes in mysql?

1 Answers  


What is the purpose of -> in the mysql terminal?

1 Answers  


What is difference between schema and table?

1 Answers  


How many columns can be used for creating Index?

1 Answers  


How do I backup mysql database on linux?

1 Answers  


How many rows can a mysql table hold?

1 Answers  


Categories