In the development of web pages, with Google and Firefox browser, it will be better. IE browser is not too easy to use.
Multi-Criteria Query
Take the car watch cars, for example.
First find out the car table, using the form to display, in addition to some query conditions in.
The first step: to find out the car table, using a table to display
<table width= "100%" border= "1" cellpadding= "0" cellspacing= "0" >
<tr>
<td> Code </td>
<td> name </td>
<td> Series </td>
<td> Time to Market </td>
<td> Fuel Consumption </td>
<td> Power </td>
</tr>
<!--each row shown, each column is read by the database--
<!--querying the database, so referencing the class file--
<?php
Include ("DBDA.class.php");//reference class file
$DX =new Dbda ();//Build Object
Write SQL statements, query statements
$sql = "SELECT * from Car";
Call the Query method to invoke the SQL statement and return a two-dimensional array after execution $attr
The returned two-dimensional array contains all the information in the car's table.
$attr = $dx->query ($sql);
Next, the car's information, displayed, with a table to display,
With a single table, each row is a piece of data, so a two-dimensional array is recycled
foreach ($attr as $v)//loop out each piece of data
Here you can build each line of <tr>
{
echo "<tr>
<td>{$v [0]}</td>
<td>{$str}</td>
<td>{$v [2]}</td>
<td>{$v [3]}</td>
<td>{$v [4]}</td>
<td>{$v [5]}</td>
</tr> ";
}
Loop two-dimensional array, the $v, $v variable It contains a one-dimensional array, and a one-dimensional array of each data stored in the specific value.
?>
</table>
PHP-----Multi-Criteria Query