Hi,
Have tried the following:
if($MyDataBase->query("select * from users where UserId='$UserId' and Password='$UserPw'")==0)
{
printf("<br/>%s<br/>",ShapeString(UNKNOWN_USER_OR_PASSWORD));
}
else
{
$MyDataBase->query("update users set NumberOfVisits = NumberOfVisits + 1 where UserId='$UserId' and Password='$UserPw'");
The first SQL query where i verify the user works fine. But the second one where I try to update a number of visits counter doesn't :-(. If I execute the same query from a MySQL GUI like SQLyog on the same db and table it works fine but not from PHP, why? Any suggestions appreciated.
/Mats
Have tried the following:
if($MyDataBase->query("select * from users where UserId='$UserId' and Password='$UserPw'")==0)
{
printf("<br/>%s<br/>",ShapeString(UNKNOWN_USER_OR_PASSWORD));
}
else
{
$MyDataBase->query("update users set NumberOfVisits = NumberOfVisits + 1 where UserId='$UserId' and Password='$UserPw'");
The first SQL query where i verify the user works fine. But the second one where I try to update a number of visits counter doesn't :-(. If I execute the same query from a MySQL GUI like SQLyog on the same db and table it works fine but not from PHP, why? Any suggestions appreciated.
/Mats