I'm using the following to query the database for data.
The row I'm searching for information from is time in the database, and mtime is a row that holds max time for the test.
Expand|Select|Wrap|Line Numbers
- $query = "SELECT * FROM info WHERE class = 'Math'";
- $data = mysqli_query($db, $query);
- $row = mysqli_fetch_array($data);
- $time = 5;
- // Begin and IF statement to update the rows
- if ($row['time'] != $row['mtime']) {
- $updatetime = $query = "UPDATE info set time=time+$time, WHERE class = 'Math'";
- } // Close If
Thanks for all help ahead of time!