Which is the best method to fetch the data from mysql?
1.mysql_fetch_array()
2.mysql_fetch_object()
3.mysql_fetch_row()
4.mysql_fetch_assoc()

Answer Posted / devendra modi

mysql_fetch_object() is better then mysql_fetch_array()
because mysql_fetch_array () will return numeric and
associative array if you have 1 lac record then it will
generate two array mean load two lack record. so it is
slower then mysql_fetch_object()

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me how to create a session? How to set a value in session? How to remove data from a session?

726


Explain what is memcache?

723


What are the environmental variables?

801


List some string function name in php?

727


What is magic function in php?

765


Why triggers are used in mysql?

756


Steps for the payment gateway processing?

761


What is difference between include and include_once in php?

716


How does php sessions work?

719


Define object-oriented methodology?

810


What does pear stand for?

726


How to include a file to a PHP page?

780


What are the php functions?

759


How big is nvarchar max?

782


Is php a case sensitive language?

948