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

Which methods should be used for sending an email using the variables $to, $subject, and $body?

1204


What is T_PAAMAYIM_NEKUDOTAYIM?

1258


How error handling is being handled by php?

1101


What is php and why it is used?

1085


What are the characteristics of php variables?

1141


What is the integer?

1139


What is a php session?

1108


What is htmlentities function in php?

1001


What is the difference between characters 34 and x34?

963


What is sql injection in php?

1212


What is query string php?

1023


Tell me how to find the position of the first occurrence of a substring in a string?

1017


How to create database connection and query in php?

1083


What is api example?

1038


How can image properties be retrieved in php?

1043