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 ?    24 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 ?    4 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 ?    0 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

Can mysql and mariadb coexist?

0 Answers  


What is memory table in mysql?

0 Answers  


What is cast in mysql?

0 Answers  


What is slow query log in mysql?

0 Answers  


I have two sql database at different PC.how can link b/w database and database tables.

2 Answers  






What is a deterministic function?

0 Answers  


What is the difference between a database and a table?

0 Answers  


Which datatype is used for email in mysql?

0 Answers  


What are the steps involved in query processing?

0 Answers  


How to enter binary numbers in sql statements?

0 Answers  


How to escape special characters in sql statements?

0 Answers  


If you specify the data type as DECIMAL (5,2), what?s the range of values that can go in this table?

2 Answers  






Categories