ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-db
php-db
[PHP-DB] issue with MySQL stored procedure and result set
by Alain Roger other posts by this author
Apr 20 2006 12:00AM messages near this date
Re: [PHP-DB] short text strings with apostrophes and forms | [PHP-DB] QMAIL PHP and Email sending problems?
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved