Can anybody help me
with select query
how to do this:
I have table "foo1" with two fields "image" "check"
| image | check |
| 6782 | 0 |
| 2732 | 1 |
| 6734 | 1 |
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"]
I mean I need to check if there is 0 or 1 and so if check is 1 then show original number from image field but if there is 0 then it changes original content to "noimage"
so then is possible to optimise my database
otherwise I need to do this with web development scripts to check if I have image name like in image field so its sucks
so maybe somebody can help me with that ok
Mega Regards
--
Svens Klave
---------------------------------------------------------------------
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
- Re: Help - select syntax if else Svens Klave
- Re: Help - select syntax if else Brent Baisley
- subselect workaround help? Lefevre, Steven
- RE: subselect workaround help? Alexander M. Turek
- RE: subselect workaround help? Joe Stump
- Re: subselect workaround help? Rodney Broom
- Re: Help - select syntax if else Roger Baklund
- Re: Help - select syntax if else Zak Greant
- Re: Help - select syntax if else Keith C. Ivey