issue with MySQL stored procedure and result set
am 20.04.2006 08:59:06 von Alain Roger------=_Part_241_28852812.1145516346362
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I'm trying to run a MySQL Procedure from one of my PHP page.
1. the procedure works perfectly under MySQL (it gives the correct results)=
,
so no issue from this side.
2.user is able to connect without any issue to MySQL RDBMS, so no issue fro=
m
this side.
Here is what i've as error message when PHP page is displayed :
"PROCEDURE test1 can't return a result set in the given context"
i've searched on internet and i've found 2 intereseting information :
1. i should update MyODBC connector. But i do not understand it as it work
perfectly under MySQL query browser or under another Query tool.
2. i should add a flag in my command : mysql_connect(....);
this flag should be something like MULTI_CLIENT_..... After controling the
PHP documentation (v5.1 and 4.6) this flag does not exist...
here is my stored procedure "test1" (this procedure as 1 IN parameter named
"criteria"
.....
BEGIN
DECLARE crit VARCHAR(256) DEFAULT "";
SET crit =3D CONCAT("%", criteria, "$");
SELECT * FROM persons WHERE login LIKE crit;
END
....
So what should i do ?
thanks a lot for help.
Alain
------=_Part_241_28852812.1145516346362--