Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between mysql_fetch_array() and
mysql_fetch_row()?

Answer Posted / sekhar

mysql_fetch_array($resultset, [return type]);
return a row from the result set as an array
return type values:
MYSQL_NUM If return type is mysql_num, we have to use the
column position in the result set.
MYSQL_ASSOC: if return type is mysql_assoc, we have to fetch
the data by using column names in result set.
MYSQL_BOTH: if return type is mysql_both, we have to fetch
the data by using column index or column names in the result
set.

mysql_fetch_rows($resultset);
retrives the row from the result set and move the pointer to
the next record.
we have to retrive the data from the row by using the filed
position in the result set.

mysql_fetch_assoc($resultset);
retrives a row from the resultset as an associative array.
we have to retrive the data by using the columns name in the
result set.

mysql_fetch_object($resultset);
return the row as an object. we have to fetch the data in
the row fetch the column names in the result set as $row->
column name in the result set.

Is This Answer Correct ?    11 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of extract function in php?

963


How to convert a character to an ascii value?

1098


How to execute a function in php?

936


What is htaccess? Why do we use this and where?

981


How be the result set of mysql handled in php?

1144


What is use of in_array() function in php?

1090


What is a php form?

1009


Where can I find php ini file?

949


What is the timeout period on session values?

1078


What is the function func_num_args() used for?

948


Which is incorrect with respect to separating php code and html?

1016


What is the function file_get_contents() usefull for?

956


How to call a php function from html button?

1070


What is the use of strpos in php?

1032


What are the advantages of indexes in php?

1036