![]() |
help with oop
what i'm trying to do with my class is instead of writeing
while($row = mysql_fetch_assoc($query)) { echo $row['field']; } i'm trying to write my own function that will do this but i dont know or am kind of confuses to how i can output more fields(from sql) and if i did write a function how will i end the while loop with a paranthesis here is my class Code:
<?php |
Ok, one or two things wrong with the class.
PHP Code:
PHP Code:
Also: PHP Code:
Also each time your while loop loops, you are calling a query and getting a new resource, which will loop infinitely over the top entry in the table. This will accomplish the same thing without looping infinitely PHP Code:
PHP Code:
|
| All times are GMT. The time now is 04:33 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0