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
What are access specifiers?
What is artisan in php?
What should be the length of variable for SHA256?
What are different types of runtime errors in php?
What sized websites have you worked on in the past?
Tell me how to create a session? How to set a value in session? How to remove data from a session?
Whether php supports microsoft sql server?
What is htmlentities function in php?
Can a super () and this () keywords be in same constructor?
What is c++ polymorphism?
What is a php array?
What new features php7 has in store for us?
Tell me what is the use of "enctype" attribute in a html form?
How to convert a json string to an array in php?
how can i develop forum code? any one pleale help me on this question