select *,if(image,"1","0") as ImagePresent from foo1 where ...
If you don't want to spell out all of the fields, that's the easiest syntax. You'll can all your fields plus an extra column named ImagePresent that will be the same as your "check" column. You could just as easily have it show the image number instead of a 1 or 0.
select *,if(image,image,"no image") as ImageNumber from foo1 where ...
On Wednesday, January 8, 2003, at 08:27 AM, Svens Klave wrote:
so I want to make query
select * from foo1 where [so is it possible to make some if check=1 then image is image but if check=0 then into image goes other content for example "noimage"]
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php