For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2007 > [PEAR] - DB - Execute Multiple different querys at the time









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [PEAR] - DB - Execute Multiple different querys at the time
Álvaro Saraiva

2007-07-23, 8:01 am

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 =3D " LOCK TABLES CORE_profissao WRITE;=20
INSERT INTO CORE_profissao SET=20
CORE_profissao.lastmodified =3D
'20070723133910',
CORE_profissao.lastmodifiedby =3D 'me';=20
SET @id =3D ( SELECT CAST( profissao_id AS SIGNED ) AS last_id
CORE_profissao BY last_id DESC 0 , 1 ) ;=20
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,
=C1lvaro


=A0
Glups
Atelier Novas Tecnologias, Lda
Rua Jaime Campos, Bloco D,
Piso 3=BA Esq.
5000-431 Vila Real
Portugal
Tel. 259 322 183
Fax 259 322 183
E-mail Geral: info@glups.pt
Assist=EAncia: assistencia@glups.pt
Site Web: www.glups.pt

=AE 2001-2007=A0Glups.
Todos os Direitos Reservados
=A0
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com