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
What are the characteristics of php variables?
What are some new features introduced in php7?
How to connect to a url in php?
How to remove leading and trailing spaces from user input values?
What is the use of explode() function?
What is psr in php?
Can we run php on tomcat server?
What is session management php?
How escape single quotes php?
Which of the data type is compound datatype supported by PHP?
What does pear stand for?
Write down the code for save an uploaded file using php?
Explain the difference between $var and $$var?
Is php a low level language?
Which is the correct way to check if a session has already been started ?