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 / pratik

mysql_fetch_object() is the best method. It is not
generally affected in small result. mysql_fetch_array() has
some limit to fetch data from table. when result it too high
(more than 4000 record) at that time
mysql_fetch_object()will support.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between require and include?

752


What exactly is PHP?

787


Are php short tags acceptable to use?

724


What is final in php?

733


How to assigning a new character in a string using php?

752


What is the difference between the include() and require() functions?

1129


Do you know is it possible to extend the execution time of a php script?

788


How to get useful error messages in php?

776


What is the use of addslashes in php?

700


What is $_ request in php?

688


When sessions ends?

726


What is overloading in php?

739


What is the use of magic function in php?

695


Is gender a dependent variable?

724


Can you specify the "new line" character in single-quoted strings?

730