|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hiya,
I need to write a script in php which checks if the value inserted in the database is higher or lower than a specific number and if the value is higher, it would display a certain statement and if its lower it display another. I am trying to use the script to display 20 figures for each subject and comparing it to the performance of previous month. thanks, Claire |
|
|||
|
try something like that:
Code:
$q=mysql_query("SELECT (value > yourvalue) as result FROM yourtable");
while($ql=mysql_fetch_assoc($q))
{
if($ql['result'])
echo 'sthg';
else echo 'sthgelse';
}
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |