On Wed, Jan 08, 2003 at 03:27:51PM +0200, Svens Klave wrote: > > 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
Good Day Svens, You can permanently change the database using the following query: UPDATE foo1 SET image='noimage' WHERE check=0; Cheers! -- Zak Greant <[EMAIL PROTECTED]> | MySQL Advocate | http://zak.fooassociates.com Using and Managing MySQL MySQL Training: Washington DC, March 17-21, 2003 Visit http://mysql.com/training for more information Public Service Announcement: Sincere Choice (http://sincerechoice.org) --------------------------------------------------------------------- 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