- DB - Execute Multiple different querys at the time
| From: | Álvaro Saraiva | Date: | Mon, 23 Jul 2007 11:41:23 +0000 |
| Subject: | - DB - Execute Multiple different querys at the time | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27712@lists.php.net to get a copy of this message | ||
Hi to all,
Is there anyway to execute different querys with PEAR DB Package in a single
call to mySQL?
Lets say we have an sql statement like:
$sql = " LOCK TABLES CORE_profissao WRITE;
INSERT INTO CORE_profissao SET
CORE_profissao.lastmodified =
'20070723133910',
CORE_profissao.lastmodifiedby = 'me';
SET @id = ( SELECT CAST( profissao_id AS SIGNED ) AS last_id
CORE_profissao BY last_id DESC 0 , 1 ) ;
UNLOCK TABLES; SELECT @id as id; "
Any help is welcome, 'cause we get PEAR::Error.
Do we need to be forced to use MDB2?
Best regards,
Álvaro
Glups
Atelier Novas Tecnologias, Lda
Rua Jaime Campos, Bloco D,
Piso 3º Esq.
5000-431 Vila Real
Portugal
Tel. 259 322 183
Fax 259 322 183
E-mail Geral: info@glups.pt
Assistência: assistencia@glups.pt
Site Web: www.glups.pt
® 2001-2007 Glups.
Todos os Direitos Reservados