In how many ways we can retrieve the date in the result set
of mysql using PHP?
Answer Posted / binoyav
1) mysql_result: returns the value of a field in a recordset.
Note: This function is slower than mysql_fetch_row(), mysql_fetch_array(), mysql_fetch_assoc() and mysql_fetch_object()
2) mysql_fetch_array(): function returns a row from a recordset as an associative array and/or a numeric array. Note: Its a misconception that, this function will return all rows. Its completely wrong, it will return only a single row at a time as like mysql_fetch_row
3) mysql_fetch_row(): returns a row from a recordset as a numeric array
4) mysql_fetch_assoc(): returns a row from a recordset as an associative array. No numerical indices available for this
5) mysql_fetch_object(): returns a row from a recordset as an object
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How does php work with apache?
What is the best website to learn php?
Is gender a dependent variable?
What is the Pipe Symbol represented?
How to enable error reporting in php?
Is empty java?
Does php support overloading?
What does $globals means?
Differentiate between require and include?
Who is the father or inventor of php?
Why php is better?
How do functions work?
A process can run only in the background. State Whether True or False?
What is null value in php?
How to remove blank spaces from the string?