Update MySQL Entry
Posted: Fri Nov 28, 2003 1:55 pm
I want to update the datbase for the specified user with the new "last login" date.
I get an error with the above code thats soemthing along the lines of "You have an error in your SQL syntax near '2003-11-28 FROM users WHERE username ='username' AND password = 'password'' at line 1"
Am I using incorect syntax. Thanks!
Code: Select all
<?php
$query = "UPDATE lastvisit SET $currentdate FROM users WHERE username = $username AND password = $password";
$resut = mysql_query($query) or die(mysql_error());
?>Am I using incorect syntax. Thanks!