Tutorial by Examples: affecte

We start off with $db, an instance of the PDO class. After executing a query we often want to determine the number of rows that have been affected by it. The rowCount() method of the PDOStatement will work nicely: $query = $db->query("DELETE FROM table WHERE name = 'John'"); $count = ...
empty statement var statement expression statement do-while statement continue statement break statement return statement throw statement Examples: When the end of the input stream of tokens is encountered and the parser is unable to parse the input token stream as a single complete Pro...
<?php // if device exists, update timestamp $stmt = $mysqli->prepare("UPDATE new_devices SET nd_timestamp=? WHERE nd_deviceid=?"); $stmt->bind_param('ss', $now, $device); $stmt->execute(); //echo "Affected Rows: ".$stmt->affected_rows; // T...

Page 1 of 1