I need to update mysql table, and get the number of tables updated using php, the code look like below,
$query = "update ACCESSUSERS set ACTIVE='111' where UPPER(USERNAME)=UPPER('firstname') and PINNUMBER='7777'";
mysqli_query($conn, $query);
$numrows = mysql_affected_rows();
printf("Records updated: %d\n", $numrows);
But the issue is the above print 0 always even if changed the value for ACTIVE
with different one.
What can be the issue, any help will be appreciated.
Note: I have tested the above query from phpMyadmin and it's working, only problem while executing in a php.
Thanks,
Haris