Hi, I have written SP in SQL Server with .NET but this is my first time with mySQL and php -
Basically the SP takes one paramater which basically is querystring value - for instance - www.abc.com/def.php?name=testing
so i call sp from my php script as -
CALL xyz($name);
(Where xyz is sp name and $name is querystring value - testing in this case)
Finally am fetching the array to $member in sp and my question is how to return this result to php page from mysql sp ?
I hope this make sense.
thanks
SP first time in mySQL
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: SP first time in mySQL
There is way too much documentation out there for me to even try to answer your question on stored procedures. See http://www.joeyrivera.com/2009/using-my ... mysqlipdo/ or if that doesn't do it for you, see http://www.google.ca/search?q=php+mysql ... =firefox-a
as for retrieving the query string parameter, you can access the named keys via $_GET. In your case,
as for retrieving the query string parameter, you can access the named keys via $_GET. In your case,
Code: Select all
echo $_GET['name']; //echo's testing Re: SP first time in mySQL
Thanks for your reply but my question was not "how to access querystring value" but "how to access stored procedure result in php"
Re: SP first time in mySQL
Did you read the articles John Cartwright pointed to?
There are 10 types of people in this world, those who understand binary and those who don't