Re: Gtklist........

From: Date: Wed, 19 Nov 2003 09:35:49 +0000
Subject: Re: Gtklist........
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4188@lists.php.net to get a copy of this message
Andy wrote:
i have written this functiona but it doen't work: 1)pear works; 2)connection works 3)final message works 4)i can't populate the listbox function loadrecs() { $db = &$this->db; $sql = "SELECT * FROM main"; $result = $db->query( $sql);
    if( $result->numRows() > 0){
    while ($row = $result->fetchRow()) {
        $id = $row[0];
Try
$id[] = array($row[0]); // assuming the clist has 1 column. Regards Alan
      }
      foreach ($id as $app) $this->arWidgets["clist1"]->append($app);
    }
MessageBox( "Records loaded ".$result->numRows() , "Information", MB_ICONINFORMATION); }//function loadrecs()
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.gtk.general (#4188) next »