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...

Which is the best method to fetch the data from mysql?
1.mysql_fetch_array()
2.mysql_fetch_object()
3.mysql_fetch_row()
4.mysql_fetch_assoc()

Answer Posted / pradeep

hi all,

i think mysql_fetch_object or mysql_fetch_array both are best method bcz both are take same time for result show.

but mysql_fetch_array() fetches the records using the numeric index (as numbers) or using the string index (as column)

mysql_fetch_object() fetches the records as the object.
ex. $record->id;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what is the difference between exception::getmessage and exception::getline?

860


Is php is dying?

901


Which php mvc framework is best?

977


What are the data types in php?

974


Why do we use in php?

932


Who is the father or inventor of php?

1025


What is the use of header() function in PHP? What the Limitation of HEADER()?

987


Are objects passed by value or by reference?

925


What does the function get_magic_quotes_gpc() means?

881


What is mysqli php?

951


Does apache use php?

932


What is mod_php?

967


Why framework is used in php?

935


How to get no of arguments passed to a PHP Function?

887


How to get the position of the character in a string in php?

1035