Interactive Parabola Grapher
Explore graph ,equation and the locus of a Parabola
Save graphs to your desktop!



A+    A−    B  
Home
Graphing Calc
Algebra
Math Games
  • Decimals in Space
  • Fraction Balls
  • Integers in Space
  • Math Man
  • Number Balls
  • Geometry
    Interactive
    Trigonometry
    Scientific Calc

    MySql Where Clause

    Limiting A SELECT Statment with a WHERE clause

    How To use a WHERE clause



    The code below prints out our APCS table for all rows whose id is greater than 5
    	<?php 
    	 $selectTable = "SELECT * FROM apcs WHERE id > 5";
     $selectEntireTable= mysql_query($selectTable ) or die(mysql_error());
    
    while($rowFromTable = mysql_fetch_array($selectEntireTable) )
    	{
    	echo $rowFromTable['firstName'] . '  '. $rowFromTable['lastName'] . ": age =" . $rowFromTable['age']  .
    	', grade = ' .$rowFromTable['gradeLevel'] . ', unique id = ' . $rowFromTable['id'] .
    	'
    '; } ?>
    Compound WHERE clause


    You can also have compound conditions in a WHERE clause.
    
    $selectTable = "SELECT * FROM apcs WHERE id > 5 AND gradeLevel < 12";
    $selectEntireTable= mysql_query($selectTable ) or die(mysql_error());
    while($rowFromTable = mysql_fetch_array($selectEntireTable) )
    	{
    	echo $rowFromTable['firstName'] . '  '. $rowFromTable['lastName'] . ": age =" . $rowFromTable['age']  .
    	', grade = ' .$rowFromTable['gradeLevel'] . ', unique id = ' . $rowFromTable['id'] .
    	'
    '; }