What is the difference between mysql_fetch_array and

Answers were Sorted based on User's Feedback

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

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

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

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 to get full name of monthname ?

4 Answers  

what is the difference between MyISAM and INNO DB in MySQL with the Advantage and disadvantage

3 Answers   ABC,

i made a table whih contain a column "Photo" with image data type and i want to insert the byte of a picture present in my hardisk using insert statement in that colum... so what will be my insert statement?

0 Answers  

what is the advantage of stored procedures, triggers and indexing in mysql

1 Answers  

Use mysqldump to create a copy of the database?

2 Answers  

What is the difference between SQL and SQL Server?

3 Answers   HCL, Cognizant,

suppose server is running Suddenly down . what can you do? but i want do not down the server?

3 Answers  

What is maximum size of a database in MySQL?

13 Answers   Wipro, V2 Solutions, CIS, Bastioncoup, NM,

What are the advantages and disadvantages of MySQL?

0 Answers   Satyam,

What is RMS Migrations

0 Answers   Steria,

Is it possible to update a table value with out using update command?. if yes what is the reason, if no what is the reason?.

1 Answers  

How can we know the number of days between two given dates using MySQL?

2 Answers   Webworks, Base2 Infotech,