You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-dev@incubator.apache.org by Dominique 'NetAndroid' Schramm <li...@schramm.es> on 2011/07/09 15:57:58 UTC
[zeta-dev] sqlabstraction update -> multiple tables @ once
Hi,
i put my head into the core of the sqlabstraction to find out how an
update performs for multiple tables. for an example:
$q = $pdb->createUpdateQuery();
$q->update('`domains`,`emailaddresses`')
->set('`domains.change`', '0')
->set('`emailaddresses.change`', '0');
$stmt = $q->prepare();
$stmt->execute();
@ the sqlabstraction i found the following code:
line:104
public function update( $table )
{
$table = $this->getIdentifier( $table );
$this->table = $table;
return $this;
}
this code means for me that only one table at once is possible. but why?
i think it will be quite simple to extend this section for multiple
tables update like the sql query. i am not perhaps i can create the code
and give it back to you?
--
Dominique 'NetAndroid' Schramm
- Twitter: @NetAndroid_BY
- Identi.ca: @netandroid
- Blog: http://netandroid.nl/
Re: [zeta-dev] sqlabstraction update -> multiple tables @ once
Posted by Maxime Thomas <ma...@gmail.com>.
/7/9 Dominique 'NetAndroid' Schramm <li...@schramm.es>
> Hi,
>
> i put my head into the core of the sqlabstraction to find out how an
> update performs for multiple tables. for an example:
>
> $q = $pdb->createUpdateQuery();
> $q->update('`domains`,`emailaddresses`')
> ->set('`domains.change`', '0')
> ->set('`emailaddresses.change`', '0');
> $stmt = $q->prepare();
> $stmt->execute();
>
> @ the sqlabstraction i found the following code:
>
> line:104
> public function update( $table )
> {
> $table = $this->getIdentifier( $table );
> $this->table = $table;
> return $this;
> }
>
> this code means for me that only one table at once is possible. but why?
> i think it will be quite simple to extend this section for multiple
> tables update like the sql query. i am not perhaps i can create the code
> and give it back to you?
>
> --
> Dominique 'NetAndroid' Schramm
> - Twitter: @NetAndroid_BY
> - Identi.ca: @netandroid
> - Blog: http://netandroid.nl/
>
>
Hi Dominique,
There's a process to follow if you want to contribute to AZC.
Here it is :
http://incubator.apache.org/zetacomponents/community/dev_process.html
Regards,
--
Maxime
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou