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

Which one of the following is the correct way to select all columns and all rows from "vtable"? Choice 1 SELECT FROM vtable SELF JOIN vtable Choice 2 SELECT ALL COLUMNS FROM vtable WHERE ALL ROWS = * Choice 3 SELECT EVERYTHING FROM vtable Choice 4 SELECT vtable.* WHERE vtable = vtable Choice 5 SELECT * FROM vtable WHERE 1 = 1

3 Answers  


change column name and make a unique column so we get no dupes.

0 Answers  


How to determine the location of the data directory?

0 Answers  


How to dump a table from a database.

0 Answers  


What is the difference between unix timestamp and mysql timestamp?

0 Answers  






What are enums used for in mysql?

0 Answers  


What is the difference between primary and unique key

5 Answers   CSC,


How to display nth highest salary from a table in a mysql query?

0 Answers  


how to show all records starting with the letters 'sonia' and the phone number '9876543210' limit to records 1 through 5.

0 Answers  


How to update database permissions/privilages.

0 Answers  


about foregine

2 Answers  


What?s the difference between query_cache_type 1 and 2?

1 Answers  






Categories