Jump to content

MySQL Selection Query


pacchiee

Recommended Posts

Hello,

 

I have a table with the following structure and entries:

 

id|score1|score2|grade

1|90|100|A

2|75|89|B

3|60|74|C

4|40|59|D

5|0|39|E

 

Now, given a score how can I fetch the grade?

 

Example: Given score as 85, I should fetch 'B'.

 

Or is that I need to change the structure of the table altogether? Am new to MySQL; please help.

 

Thanks in Advance!

Link to comment
https://forums.phpfreaks.com/topic/176801-mysql-selection-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.