CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES PHP DETAILS
Question :
what is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object()
please insert with example.


Category PHP Interview Questions
Rating (4.5) By 24 users
Added on 7/19/2006
Views 1445
Rate it!
Answers:

mysql_fetch_array():: fetches a result row as a associated array, numeric array

mysql_fetch_object: Fetaches a result row as object.

mysql_fetch_row::fetches a result row as array



MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array
my fetch row fetch a result row as array



 Posted by: sanaullah    

Contact sanaullah  Contact sanaullah

mysql_fetch_array():- returns a result row as a associated array, regular array from database.

mysql_fetch_object:- returns a result row as object from database.

mysql_fetch_row:- fetches a result row as regular array.



 Posted by: modi    

Contact modi  Contact modi

mysql_fetch_array ? Fetch a result row as an associative array, a numeric array, or both. Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.



mysql_fetch_object ? Fetch a result row as an object. Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead.

mysql_fetch_row ? Get a result row as an enumerated array. Returns a numerical array that corresponds to the fetched row and moves the internal data pointer ahead.






 Posted by: shruti patrawala    

Contact shruti patrawala  Contact shruti patrawala


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
How can I maintain the count of how many persons have hit my site?

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL PHP Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/6170/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.17