TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   MySQL & Databases (http://www.talkphp.com/mysql-databases/)
-   -   match a value (http://www.talkphp.com/mysql-databases/4772-match-value.html)

rupam_jaiswal 07-23-2009 10:37 AM

match a value
 
Hi,
My table is like this

Id,Name,Location,Hobby

Condition is
- if location is 1 then possible values of Hobby can be a1,a2,a3,a4,a5
- if location is 2 then possible values of Hobby can be b1,b2,b3,b4,b5
- if location is 3 then possible values of Hobby can be c1,c2,c3,c4,c5
- if location is 4 then possible values of Hobby can be d1,d2,d3,d4,d5

Now I have to get the row whose hobby value is suppose a1.
How can I do this.I can't use like operator a1% as a100 will match then
Regards

JaoudeStudios 07-23-2009 12:48 PM

What is your query so far? and can you post your schema?

dschreck 07-27-2009 04:17 AM

could always do an EAV data scheme


All times are GMT. The time now is 02:54 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0