perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: really arbitrary sql and dbix
Date Thu, 06 Dec 2001 05:28:08 GMT


> i'm using subquery-less mysql,
> and need to create a temporary table for some of my queries.
>
> is there any way to use dbix and _really_ arbitrary sql
> (create table ...; select ...) ?
>

For create, insert etc. you can use the do method:

$set -> do ('create table .... ') ;

For select you either can obtain the database handle and use the normal DBI
methods:

$dbh = $set -> DBHdl ;
$dbh -> prepare ( )
....

or use the (undocumented) SQLSelect method

$set -> SQLSelect ($expr, $fields, $order, $group, $append, $bind_values,
$bind_types) ;

$bind_values and $bind_types are array refs. You can leave out $bind_types
most times

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message