enum and bad planning
| From: | Jeffrey_N_Dyke at Keane dot com | Date: | Tue, 01 Oct 2002 12:30:45 +0000 |
| Subject: | enum and bad planning | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22124@lists.php.net to get a copy of this message | ||
I have five enum fields, all Y/N. There is now(last minute) a requirment to
report on all clients that said Y to more then one of the questions(its a
survey). Had i known about this requirement, i could have made them BIT
and had a simple 1/0 option and summed the fields to check the total....
select * from table where sum(ENUM1, ENUM2,ENUM3, ENUM4, ENUM5) > 1; //or
something like that...
anyone have an idea of how i could accomplish the same with Y/N or should i
modify the tables and change them to 1/0's which is a doable option.
thanks much for any input.
jeff