In how many ways we can retrieve the date in the result set
of mysql using PHP?
Answers were Sorted based on User's Feedback
Answer / vasan.
4 ways
1. mysql_fetch_rows
2. mysql_fetch_object
3. mysql_fetch_assoc
4. mysql_fetch_array
Is This Answer Correct ? | 57 Yes | 4 No |
Answer / bijay.behera9911033016@orissa
1. mysqli_fetch_rows
2. mysqli_fetch_object
3. mysqli_fetch_assoc
4. mysqli_fetch_array
Is This Answer Correct ? | 22 Yes | 4 No |
Answer / ankish kumar
What is the difference between all these 4 versions:
1. mysqli_fetch_rows
2. mysqli_fetch_object
3. mysqli_fetch_assoc
4. mysqli_fetch_array
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / 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 |
How can we submit a form without a submit button?
What is needed to be able to use image function?
Write a function that takes "depth" as argument and return sum of node's data of that depth. For instance, (0) depth 0 / \ (10) (20) depth 1 / \ (40) (50) depth2 If I pass get_sum_by_depth(2) , it would return 90 (i.e. 40 + 50 )
What is the name of scripting engine in php?
Is empty check in php?
Explain the types of string comparision function in PHP
How to call php function from javascript using ajax?
Is php a dying language?
What are the options to transfer session ids?
Why does php need server?
What is chrome logger?
Tell me what are the __construct() and __destruct() methods in a php class?