I have a simple insert into database command that works and i was wondering how i could count the number of rows inserted into a database. I tried using mysql_affected_rows() but it doesn't do anything. Is there some syntax errors with my code? Thanks in advance.
$sqlRegister = "INSERT INTO `Login_Details` (`User_ID`, `Username`, `Password`, `Email`, `User_Level`, `LoginAttempt`)
VALUES (NULL, '".$username."', '".$pass."', '".$email."', '1', '1');";
$count = mysql_affected_rows(mysql_query($sqlRegister));
echo($count);