Forum Moderators: open

Message Too Old, No Replies

Select only specific data in the fields how?

         

iridion_us

1:32 am on Oct 25, 2007 (gmt 0)

10+ Year Member



Hi MySQL gurus

I have a table called cclp_players
now that table has 3 fields for instance and has data see below,
-------------------------------
¦ player_id ¦team_id¦division_id ¦
-------------------------------
¦ 001 ¦ hp ¦ golem ¦
¦ 002 ¦ ibm ¦ cestino ¦
¦ 003 ¦ sun ¦ mac os ¦
¦ 004 ¦ del ¦ bim os ¦
¦ 005 ¦ acer ¦ ms os ¦

Now i want to SELECT the table either by team_id or by division_id.
And let say i wanted to SELECT team_id by sun.

What is the right expression or combination of SELECT command for this?

Thank you very much in advance.

Discovery

8:53 am on Oct 26, 2007 (gmt 0)

10+ Year Member




select * from cclp_players where team_id = 'sun'
or
select * from cclp_players where player_id = '003'
or
select * from cclp_players where team_id = 'sun' and player_id = '003'