"; } // sql select command $query = "SELECT * FROM Persons"; // create the sql command $result = mysqli_query($db_server, $query); // execute the sql command if (!$result) die ("Error executing sql command"); $rows = mysqli_num_rows($result); // get number of rows retrieved from the command //echo "Retrieved " . $rows . " row(s)
"; ?> SQL Select

CPTG 374

"; echo "PersonIDFirstNameLastName"; for ($j=0; $j<$rows; $j++) { $record = mysqli_fetch_row($result); // get record $j echo ""; echo "$record[0]"; echo "$record[1]"; echo "$record[2]"; echo ""; } echo ""; ?>