RE: [PEAR] DB_DO Questions:
| From: | Koistya `Navin | Date: | Sun, 04 Sep 2005 23:28:28 +0000 |
| Subject: | RE: [PEAR] DB_DO Questions: | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20776@lists.php.net to get a copy of this message | ||
Or even better:
function get($k = null, $v = null, $j = null)
{
if ($v === true || $j === true) {
$jt = new DO_JoinTable;
$this->joinAdd($jt);
}
return parent::get($k, $v);
}
> -----Original Message-----
> From: Koistya `Navin [mailto:navin@php.net]
> Sent: Monday, September 05, 2005 3:20 AM
> To: 'pear-general@lists.php.net'
> Subject: RE: [PEAR] DB_DO Questions:
>
>
> I'm trying to add function which will perform query with all joined
tables.
>
> For example (at DO Class):
>
> ...
>
> function get($k = null, $v = null, $join = false)
> {
> if ($join) {
> $jt = new DO_JoinTable;
> $this->joinAdd($jt);
> }
> return $this->get($k, $v);
> }
>
> ...
>
>
> Suppose that this function will perform appropriate query so I could get
> all table vales including joined table.
>
> $do = new DO_MyClass;
> $do->get(1, null, true);
>
> Got the idea?
>
> Is that correct way doing this?