![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
what is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object()please insert with example
asked by: popular123 on: Mar 22, 2009
Best Answer ! ! !
mysql_fetch_row ::Return row as aan enumrated array and each line contain a unique ID .example.
what is difference between mysql_fetch_array() mys...
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
introvert_guy answered on£ºMar 24, 2009 0 comments 
mysql_fetch_object -> Fetch the first single matching record of results.
mysql_fetch_array -> Fetch the all matching records of results.
dslitemylove answered on£ºMar 25, 2009 0 comments
mysql_fetch_row Get a result row as an enumerated arrayEach column has to be accessed as $row[0] $row[1] etcmysql_fetch_array Fetch a result row as an associative array a numeric array or both$row[0] or $row['user_id']both field name or enumerated array value can be usedmysql_fetch_object Fetch a result row as an object$row->user_id $row->pass etc
fzz_91 answered on£ºMar 26, 2009 0 comments 
namie answered on£ºMar 27, 2009 0 comments
I will try to make you understand following points.
dias answered on£ºMar 29, 2009 0 comments 
mysql_fetch_array returns the array and you can only access the database fields as array but not by their names but mysql_fetch_objewct returns the object and you can access the fields by using their names.
maverick1 answered on£ºMar 30, 2009 0 comments