473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Display icon if database value exeed some limit

250 100+
My php application i want to display a icon when it exeed some value. Eg: I have rainfall values in my database and if some value exeed the given higher limit the icon sholud display on my web page. How can i do that?
Mar 27 '08 #1
2 1346
Markus
6,050 Expert 4TB
[php]
if($_waterfall_measurement > 200)
{
echo "<img src='exceeded.jpg' />";
}
else
{
echo "<img src='green.jpg' />";
}
[/php]

Just use an if statement :)
If the measurement is greater than 'whatever', show relevant image.

Regards
Mar 27 '08 #2
ghjk
250 100+
[php]
if($_waterfall_measurement > 200)
{
echo "<img src='exceeded.jpg' />";
}
else
{
echo "<img src='green.jpg' />";
}
[/php]

Just use an if statement :)
If the measurement is greater than 'whatever', show relevant image.

Regards



This is what i have done. I want to get the value which exceed threshold value. how can i do that?[PHP]$qq = mysql_query("SELECT Rainfall_ID,Station_ID,Rainfall FROM rainfall ORDER BY Rainfall_ID");
while($row = mysql_fetch_array($qq)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
echo "$Station_ID".','."$Rainfall";

}

$qq = mysql_query("SELECT Station_ID,Threshold_Val FROM station ORDER BY Station_ID");
while($row = mysql_fetch_array($qq)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
echo "$Station_ID".','."$Threshold_Val";
}[/PHP]
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ondernemer | last post by:
Imagine 25.000.000 records in a database with a table like this: TABLE SUBJECTS table_id (INT) subject (VARCHAR(200)) date_added (TIMESTAMP) The SUBJECT field is a long string. Something...
2
by: SAN CAZIANO | last post by:
how can I have on the right of an input field the number of the char that we can put on it (when it's length is changed this number must changed itself: perhaps onkeypress event)???
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: Chris H | last post by:
Ok in the following code I am trying to have my keywards meta tag auto insert the top 10 titles from most recently added database entries, right now the while loop is only setting the $keyword...
9
by: Ben R. | last post by:
Hi guys, I've got a DB table of timecards with these fields in the table: ID (Int) UserID (Int) DateWorked (DateTime) HoursWorkedOnThatDate (Double) I'd like to display a grid, with...
3
by: Ian | last post by:
I have a form with a sub form, on the continues sub for I want to display some data along with a picture, on the On Current event I have the code: .Picture = Nz() is the name of the picture...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
1
by: swethak | last post by:
Hi, I write the code to display images.But it will not display image.And also gives the error like that error : Notice: Undefined index: gim in F:\Facebook\pic_up.php on line 59 plz tell...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.