mysql affected rows
Posted: Sat Jun 12, 2004 11:58 pm
the following will always say the that the account has been activated.
I must be doing something wrong here
Code: Select all
# sorry my mistake UPDATE table should be UPDATE users
$query = mysql_query("UPDATE table SET unique_id='$_GET[id]',active=1 WHERE unique_id='$_GET[id]' AND active=0");
if(mysql_affected_rows()==1) {
// if (mysql_affected_rows($query)==1) {
print 'you are activated';
}
else
{
print 'you are already activated or you have not been sent activation';
}