[development] SQL Query Doubt

Austin Einter austin.einter at gmail.com
Sat Apr 16 11:33:57 UTC 2011


Hi
Thanks for reply.

I  have tried SELECT EmployeeID FROM {tablename} WHERE Skill = 'PHP' AND
Skill = 'Java';  .  It does not work.
Probably in SQL in same row of table both values are not matching.
Regards,
Austin
On Sat, Apr 16, 2011 at 4:54 PM, Jason Flatt <drupal at oadaeh.net> wrote:

>  On Sat, 16 Apr 2011 16:09:59 +0530
> Austin Einter <austin.einter at gmail.com> wrote:
>
> > Hi All
> >
> > Lets say I have one table in below format.
> >
> > EmployeeID.............. Skill
> > ------------------------------------------------------
> > 1...............................PHP
> > 1...............................SQL
> > 1...............................Java
> > 1................................VoIP
> >
> > 2................................Shell Scripting
> > 2................................PHP
> > 2................................Java
> >
> > 3............................... C++
> > 3................................C
> > 3.................................Pearl
> >
> > I wan to do a SQL query for employess who MUST have skill PHP and Java.
> > As per above table, the query result should show Employee 1 and 2.
> >
> > Now what should be the corresponding SQL query for it.
>
> SELECT EmployeeID FROM {tablename} WHERE Skill = 'PHP' AND Skill = 'Java';
>
> This might help a bit:
> http://dev.mysql.com/doc/refman/5.1/en/sql-syntax.html
>
>
> --
> Jason Flatt
> Custom Website development solutions: http://www.oadaeh.net/
> Father of seven: http://www.flattfamily.com/ (Joseph, 18; Cramer, 16;
> Travis,
> 14; Angela; Harry, 10; William, 5; and Dolly, 2) Linux user:
> http://www.ubuntu.org/ Android user: http://www.android.com/
> Drupal fanatic: http://drupal.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110416/485e91a9/attachment.html 


More information about the development mailing list