in reply to Executing multiple mysql commands in a single execute() call.
Are you sure that multiple SELECT statements make sense? Do all queries return the same data types in their columns? Maybe you just want a UNION statement?
SELECT * FROM Games WHERE Team_ID=@t_id AND Date>'2012-05-01' UNION SELECT * FROM Games WHERE Team_ID=@t_id AND Date between '2012-04-01' +and '2012-05-01' -- ...
Also, why do you want to use a variable there, instead of using a join clause? MySQL seems to have "eval" Google tells me, and the documentation also seems to support the idea of having a query return multiple resultsets. Maybe that solves your problem in a different way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Executing multiple mysql commands in a single execute() call.
by membender (Novice) on May 30, 2012 at 09:29 UTC | |
by Anonymous Monk on May 30, 2012 at 11:42 UTC | |
by bimleshsharma (Beadle) on May 30, 2012 at 12:23 UTC |