CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Find result in a range

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 08/18/2010, 11:58 AM

Hi All..Need a point in the right direction.

Lets say a student gets a score on a test.

We need to find out their "scaled score"

The db table 'scale_scores' has this data:

upper_ limit scale_score
6 125
12 129
15 132

What is the formula to find out what their scaled score is?

Lets say they get a score of 4: that would fall in the first row.
A score of 14 would fall in the third row.

Thanks!

Using Mysql 5
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
datadoit
Posted: 08/18/2010, 2:25 PM

Something like 'WHERE score >= upper_limit LIMIT 1'

would pull the next matching record.
ckroon

Posts: 869
Posted: 08/18/2010, 2:48 PM

Thanks Data... :-D

wouldn't it be WHERE score <= upper_limit LIMIT 1' ?

also.. is there a way to do this with PHP?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.