tags:

views:

27

answers:

3

Am using two select statements in a stored procedure but it is returning only single select statement table,how to get the both tables record set please suggest me?

A: 

Here is an example on how it is done in c.

EDIT:
Here is an example on how it is done in php

Unreason
+1  A: 

Make sure you are using the mysqli extension in php to be able to get multiple result resources from stored procedures - the standard PHP mysql interface doesn't support it.

This seems like a pretty good introduction to the class, especially:

First thing’s first, you shouldn’t treat calls to stored procedures which return a resultset as you would normal SQL queries. The reason being is that when executed, a stored procedure will give you two resultsets back. One with the actual resultset and another which sends the status of the stored procedure (OK/ERR).

danp
+1 , add example link :http://www.devcomments.com/Interesting-MySQLi-issue-Stored-Procedures-with-Multiple-Results-to160455.htm
Haim Evgi
Added a link, and a quote from the post.
danp
A: 

union keyword? It is hard to answer without query.

foret