Junior PHP Developer Question:
Download Job Interview Questions and Answers PDF
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
Answer:
☛ Mysql_fetch_array Fetch a result row as an associative array, a numeric array, or both.
☛ mysql_fetch_object ( resource result ) Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
☛ mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
☛ mysql_fetch_object ( resource result ) Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
☛ mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
Download Junior PHP Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell us how to create an array of a group of items inside an HTML form? | Tell me what is PEAR? |