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

How do I get csrf token?

730


Is php front end?

675


What is php addslashes?

764


What is serialization in php?

675


What is escaping to php?

727


What is string function sql?

706


Tell me how to strip whitespace (or other characters) from the beginning and end of a string?

720


What is the importance of "method" attribute in a html form?

781


What does $_files means?

719


What is php oop?

710


Tell me how to find the length of a string?

801


How to convert the first character to upper case?

695


What does explode do in php?

741


What is the functionality of the functions strstr() and stristr()?

722


Write a query to find the 2nd highest salary of an employee from the employee table?

837