Re: If expressions in selects....

From: Date: Thu, 15 Mar 2001 15:36:11 +0000
Subject: Re: If expressions in selects....
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7515@lists.php.net to get a copy of this message
In article <NEBBIPLCALFEOCKBEDJHEEDCCBAA.trond@havneavisen.net>, trond@havneavisen.net ("Trond E. Hundal") wrote: > Is it possible to run sql expressions in an if expression??? > Eks: IF(table1.id > 12, table1.id, 'Not') Do you mean something like "select if(table1.id > 12, table1.id, 'Not') from foo where somefield='bar'"? Yes, it's possible. See the mysql.com manual for details. -- CC

« previous php.db (#7515) next »