0
我怎样才能返回结果集从第二select语句如何从过程中的第二个select语句返回结果集?
我有样:
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getGender20`(in id INT)
BEGIN
DECLARE str VARCHAR(50);
select @str :=gender from memeber_info where id=id;
if (str = 'Male') then
select '12345' ;
end if;
select '123' ;
END
我的程序重新调整male
,而我需要它返回123
。这可以如何实现?
感谢您的帮助,但我可以使用结果集中的第二个select查询输出 – user1047873 2012-07-29 19:21:14
如果您使用[mysqli](http://php.net/manual/en/mysqli.multi-query.php),则可以使用。不知道其他API的。 – Vatev 2012-07-29 19:39:48