List:General Discussion« Previous MessageNext Message »
From:Hank Date:September 3 2010 7:27pm
Subject:Re: question about VIEWS in 5.1.x
View as plain text  
On 02/09/2010 8:30 p, Hank wrote:
>>
>> Simple question about views:
>>
>>
> Hank,
> Have you tried "running away from the problem :-)" by doing...
>
> CREATE PROCEDURE `combo`(theid INT)
> BEGIN
>        (SELECT * FROM table1 WHERE id = theid)
>        UNION
>        (SELECT * FROM table2 WHERE id = theid);
>    END$$
>
> then calling it using
>
> call combo(value);
>

Wow - thanks. This works perfectly.   I'm assuming I can use "call
combo(value)" in PHP and it returns the result set as if it were a
proper table?

-Hank
Thread
question about VIEWS in 5.1.xHank2 Sep
  • Re: question about VIEWS in 5.1.xJangita3 Sep
    • Re: question about VIEWS in 5.1.xMySQL)3 Sep
Re: question about VIEWS in 5.1.xHank3 Sep
  • Re: question about VIEWS in 5.1.xJangita6 Sep
Re: question about VIEWS in 5.1.xJangita6 Sep