Simas
unread,Oct 15, 2011, 7:47:54 AM10/15/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Simple PHP Framework
Hi, how to get value from DB ($this->columnname..) in constructor
(dboject class) ?
public function __construct($id = null)
{
parent::__construct('klientai', array('id', 'owner',
'address', 'phone', 'squares'), $id);
$this->t = getdate();
$this->Generate($this->squares); // <<----------- $this-
>squares passes empty!! Why!?
}
If I call like this, everything is ok:
public function Get_Mokestis(){
return this->squares; <-- works
}
Here is main call:
$klientai = DBObject::glob('Apskaita', "SELECT * FROM klientai LIMIT
{$pager->firstRecord}, {$pager->perPage}");