I am really new working with classes.  Some of the ideas I am getting, some I am not.
I wrote this simple little class, with a connection method, and a method to loop 
through the
data.  I am not even sure if my code is write (for the loop), but I am having trouble
displaying the data.  My connection works fine, but my loop is jacked.  Could anyone
suggest or maybe correct a mistake (if you see any)?  Just looking to see if I am 
started in the right direction, or if I have this all bass ackwards.  
I have no clue if this is even possible.  I am looking to create a while loop for 
query I run, and make each row equal to whatever field I put in.  I have all variables
defined within the scope of my class.

Thanks for your help.
Code :
function getdata() {

    $this->sql = $query;

    $result = mysql_query($query);

    $fetch = "mysql_fetch_array";

         while ($row = $fetch($result)) {
             $this->field = $row['$this->field'];


                 if(!$result) {
                      $this->error = mysql_error();



[ bryan fitch . programmer . [EMAIL PROTECTED] ]

Reply via email to