sql - getting the column name -


i've below html.

<!doctype html> <html> <head> <meta charset="utf-8"> <title>untitled document</title> </head>  <body> <form name="new" method="post" action="getr.jsp"> <div class="main">   <table width="200" border="1">     <tr>       <td>units</td>       <td><input type="text" name="units" id="units"></td>     </tr>     <tr>       <td>product type</td>       <td><input type="text" name="prodt" id="prodt"></td>     </tr>     <tr>       <td>hours</td>       <td><input type="text" name="hours" id="hours"></td>     </tr>     <tr>       <td colspan="2"><input name="submit" type="submit" id="submit" value="submit"></td>     </tr>   </table> </div> </form> </body> </html> 

and below data base table

enter image description here

here when user enters number of units , hours , product type(product type same database table name) based on input, output should column names(whether achieved, exceeded or far exceeded) . please let me know how can write query it.

for example given row.

we entered units 1, , if hours 8(4.1hrs-8hrs), should show no.of.hours achieved, if hours 4(2.1hrs-4hrs) should show exceeded , if 2(below 2 hrs) should show far-exceeded.

thanks


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -