Re: Syntax to call a class' methods in your own class

From: Date: Thu, 25 May 2006 00:41:58 +0000
Subject: Re: Syntax to call a class' methods in your own class
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236869@lists.php.net to get a copy of this message
thanks :) that helps g On May 24, 2006, at 3:19 PM, Brady Mitchell wrote:
This works: $rs= $this->conn->GetAll("SELECT title FROM content WHERE page_id= ?", $id);
You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use the Execute() function to be able to iterate through $rs like you are trying to do: $rs= $this->conn->Execute("SELECT title FROM content WHERE page_id= ?",$id);
This fails: while (!$rs->$this->conn->EOF) { // iterate through $rs }
Try: while(!$rs->EOF) { // do whatever $rs->MoveNext(); } You may want to take a look at the phpgacl (http://phpgacl.sf.net) class, it has integrated ADODB so it may be a good example for you to follow. HTH, Brady --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#236869) next »