| Á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
|