Date: 04/30/00
- Next message: Darren Lindley: "RE: [PHP3] checking wether a cookie exists or not"
- Previous message: Wizaerd: "[PHP3] Performance question"
- In reply to: Wizaerd: "[PHP3] Performance question"
- Next in thread: Wizaerd: "RE: [PHP3] Performance question"
- Reply: Wizaerd: "RE: [PHP3] Performance question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Wizaerd wrote:
>
> I don't really know if this is more appropriate for this list of the mySQL
> list, but it's about performance comparisons between the three different
> ways to obtain data from a mySQL database...
>
> $row = mysql_fetch_row($result);
> $row = mysql_fetch_array($result);
> $row = mysql_fetch_object($result);
>
> Is there one that's better than the others to be using? Is there a standard
> to adhere to for which one to use?
If you want to be absolutely technical the functions in order of speed
(fastest to slowest) are:
mysql_fetch_row
mysql_fetch_array
mysql_fetch_object
However the speed difference is so neglible, that you should just use
whatever is most comfortable for you.
Sterling Hughes
sterling <email protected>
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Darren Lindley: "RE: [PHP3] checking wether a cookie exists or not"
- Previous message: Wizaerd: "[PHP3] Performance question"
- In reply to: Wizaerd: "[PHP3] Performance question"
- Next in thread: Wizaerd: "RE: [PHP3] Performance question"
- Reply: Wizaerd: "RE: [PHP3] Performance question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

