Web IT
asked on
Is it possible to set a mysql query as a variable ?
Imaging you have an basic statment
SET @variable. command but I want to set the whole statment do I have to use functions ?
or is there a way (which I tried) such as:
SELECT @variable.
SELECT * FROM post_id WHERE wp_postmeta =2;
I know the SET @variable. command but I want to set the whole statment do I have to use functions ?
or is there a way (which I tried) such as:
SET @variable = (SELECT * FROM post_id WHERE wp_postmeta =2);
then I can run the command usingSELECT @variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.