With php/mysql how can i get the number of rows that a query affected?
what i tried so far:
$result = mysql_query($q); mysql_num_rows($result);
Whe can also do it using PDO :
$db = new PDO('', '', '')// your connection $sql = "UPDATE tb_table SET rowname = value WHERE rowid = 1"; $query = $db->query($sql); echo $query;