<p>I'm writing an application in PHP 5. I want to delete some rows in a SQLite v2 database file. I'm doing something like this:</p>

<pre><code>$sqliteConnection = new SQLiteDatabase('path/to/db');
$queryString = "DELETE FROM myTable WHERE status='not good'";
$result = $sqliteConnection-&gt;query($queryString);
</code></pre>

<p>how can I know how many rows were affected by this query? how many rows have I deleted?</p>

The PHP function
```
sqlite_changes()
```
does this for you.
Returns the numbers of rows that were changed by the most recent SQL statement executed against the
```
dbhandle
```
database handle.
Call it either in procedural-style:
```
```
echo 'Number of rows modified: ', sqlite_changes($sqliteConnection);
```
```
or in object-style:
```
```
echo 'Number of rows modified: ', $sqliteConnection->changes();
```
```