| Query String | The first step is to put the desired query into a PHP string:
|
||||||||
| Query Function | The next step is to call a function that sends the string to the database:
|
||||||||
| Example | $query = "SELECT first, last FROM names";
$rows = db_get_rows($query);
for ($i = 0; $i < count($rows); $i++) {
$row = $rows[$i];
echo $row[first] . " " . $row[last];
echo "<br>";
}
|