Question:
What is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object() please insert with example.
Answer:
mysql_fetch_array():: fetches a result row as a associated array, numeric array
mysql_fetch_object: Fetaches a result row as object.
mysql_fetch_row::fetches a result row as array Source: CoolInterview.com
MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array my fetch row fetch a result row as array Source: CoolInterview.com
Answered by: sanaullah | Date:
| Contact sanaullah
mysql_fetch_array():- returns a result row as a associated array, regular array from database.
mysql_fetch_object:- returns a result row as object from database.
mysql_fetch_row:- fetches a result row as regular array. Source: CoolInterview.com
Answered by: modi | Date: 1/30/2009
| Contact modi
mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or both. Returns an array that corresponds to the fetched row and moves the internal data pointer ahead.
mysql_fetch_object — Fetch a result row as an object. Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead.
mysql_fetch_row — Get a result row as an enumerated array. Returns a numerical array that corresponds to the fetched row and moves the internal data pointer ahead.
Source: CoolInterview.com
Answered by: shruti patrawala | Date: 10/27/2009
| Contact shruti patrawala
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|