I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8029
41131 credits Members referred : 3
« Reply #1 on: Apr 24, 2008, 07:48:39 AM »
Using class variables is good only if you are going to reuse that data in many functions of the class. Otherwise it looks more like spending too much memory.
Cyberpunk Wannabe
Posts: 46
352 credits Members referred : 0
« Reply #2 on: Apr 24, 2008, 09:23:27 PM »
yeah the data is going to be used in about 3-4 functions currently, but is there a benefit for using one of them styles to store the data or the other?
Nikolas' Servant Child
Posts: 30
184 credits Members referred : 0
« Reply #3 on: Apr 25, 2008, 11:31:29 AM »
Use mysql_fetch_object if you want the whole set of column data to stick around as a group for processing now or later. Use mysql_result if you only want specific columns, or if you want to process the values in PHP (rather than in SQL) before constructing your object.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7710