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 / pradeep
hi all,
i think mysql_fetch_object or mysql_fetch_array both are best method bcz both are take same time for result show.
but mysql_fetch_array() fetches the records using the numeric index (as numbers) or using the string index (as column)
mysql_fetch_object() fetches the records as the object.
ex. $record->id;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What is T_PAAMAYIM_NEKUDOTAYIM?
How error handling is being handled by php?
What is php and why it is used?
What are the characteristics of php variables?
What is the integer?
What is a php session?
What is htmlentities function in php?
What is the difference between characters 34 and x34?
What is sql injection in php?
What is query string php?
Tell me how to find the position of the first occurrence of a substring in a string?
How to create database connection and query in php?
What is api example?
How can image properties be retrieved in php?