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

Print 3 highest salary

9 Answers  


A select query over a large table runs very slow because of the growing number of entries in that table. What different measures could be taken to improve speed?

5 Answers  


how to get only updated, deleted , inserted records after certain interval time in mysql with out using triggers...

0 Answers  


What is striped backup

0 Answers   Cap Gemini,


in a master-master replication with two masters and alternate slaves running on two systems.can i have a script or any mysql command to know which one is right now acting as master.

1 Answers  






ru compare the 2 null values?

2 Answers   ACC,


how to find 2nd highest salary in random database salary of employer.....

4 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  


What is Database?

2 Answers  


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

2 Answers  


What is Inner Joints and Outer Joints ? What is right outer joints,left outer joints,right inner joints , left inner joints ,

2 Answers   HP,


The structure of table view buyers is as follows: +----------------+-------------+------+-----+---------+----- -----------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----- -----------+ | user_pri_id | int(15) | | PRI | NULL | auto_increment | | userid | varchar(10) | YES | | NULL | | +----------------+-------------+------+-----+---------+----- -----------+ the value of user_pri_id the last row 2345 then What will happen in the following conditions? Condition1: Delete all the rows and insert another row then. What is the starting value for this auto incremented field user_pri_id , Condition2: Delete the last row(having the field value 2345) and insert another row then. What is the value for this auto incremented field user_pri_id

2 Answers  






Categories