On Fri, Jun 06, 2003 at 05:19:20PM -0500, Paul DuBois wrote:At 15:11 -0700 6/6/03, Jeremy Zawodny wrote: >On Fri, Jun 06, 2003 at 04:15:29PM -0500, Mark Rages wrote: >> I need a placeholder statement that does nothing. >> >> Is there something more elegant than >> SELECT FROM ... WHERE 0=1; ? >> >> I need this because PHP throws an error when an empty statement >> (or just a ';') is passed to MySQL. > >SELECT 1; > >? >--
That returns a row, though. :-)
SET @ignore_me = 0;
?
--Pete
That'll work. Another possibility (for 3.23.47 and up) is DO. For example:
DO 0
Evaluates the expression without returning any results.
-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]