Re: issue with MySQL procedure and a result set

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

 



On Thu, April 20, 2006 1:55 am, Alain Roger wrote:
> 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.

Are you using MyODBC?

Why?!

If you are, then this is probably the problem/solution.

See, what MySQL supports and what MyODBC will support in terms of SQL
and PROCEDURES and whatnot don't have to match up.

So you need the new MyODBC and that's all there is to it.

Or switch to using PHP's mysql() functions.

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

Check the MySQL docs.  It's probably a constant in MySQL, not in PHP.

Also just try this:

<?php echo MULTI_CLIENT.....;?>

Only type the real constant name.

If it's not defined in PHP, you'll just see 'MULTI_CLIENT....'

If it is defined, it will probably be a number like 15 or 63 or
something.

If it is not defined, you can probably find out what the number is in
the MySQL docs.  If you find out that it is, say, 3, then do:
<?php
  define('MULTI_CLIENT...', 3);
?>
and just follow the directions about connect.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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