issue with MySQL procedure and a result set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 from
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 = CONCAT("%", criteria, "$");
   SELECT * FROM persons WHERE login LIKE crit;
END
...

So what should i do ?

thanks a lot for help.

Alain

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux