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 enable or disable a row of a table using MySQL in struts?

0 Answers  

What is the difference Delete and Drop ?

6 Answers  

Difference between MYSQL_ASSOC,MYSQL_NUM and MYSQL_BOTH ?

3 Answers   TCS,

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

1 Answers  

explain GROUPBY & HAVING clause with examples.

0 Answers  

How can we find the number of rows in a table using MySQL?

3 Answers  

A company wants to store their invoices in a database. They already have their customers and articles in that database. Both customer and article are each identified by an unique integer value. Please create the SQL statements for creating the necessary table(s) for storing the invoices in a MySQL database. An invoice should hold information like invoice number, customer, date, article(s) and quantity etc.

1 Answers  

how to declare unique key in creating a table..?

2 Answers  

suppose data is copie to oracle to sql by using DTS. Actully it taken 2 hours. suppose some day distribute the server in the middle of 2 hours. after how can i get the data ?

0 Answers   ACC,

What is RMS Migrations

0 Answers   Steria,

What is the difference between SQL and SQL Server?

3 Answers   HCL, Cognizant,

How do you change a password for an existing user via mysqladmin?

2 Answers