|
Posted by Seansan on 03/29/07 19:46
Tom wrote:
> On Wed, 28 Mar 2007 18:17:19 +0200, Seansan wrote...
>> Anybody have an idea why (and I have been trying for 1 hour now) when I
>> execute this code that last_change is never update, but all the other
>> fields are?
>>
>> I just have no idea!
>>
>> $DB->query("UPDATE ".get_table_name('users')."
>> SET last_login=NOW(), last_change=NOW(),
>> session=?
>> WHERE user_id=?",
>> true, $_SESSION['user_id']);
>
> Maybe try building your statement as a variable, them print it out to make sure
> the syntax is correct.
>
> $cmd = ("UPDATE ".get_table_name('users')."
> SET last_login=NOW(), last_change=NOW(),
> session=?
> WHERE user_id=?";
>
> echo($cmd);
>
> $DB->query($cmd,true, $_SESSION['user_id']);
>
>
> Might also try using "mysql_error()" to see if that returns a specific error.
>
> Tom
> --
> Newsguy.com
> Express Accounts - 30 GB $9.95 / month
>
First of al thank you for your answers.
I just changed the table column to another name (now temporaily called
TEMP). Now it does update!!!
It seems like "last_change" is some kind of protected name/variable.....
or I dont know. BTW I use PEAR DB class.
I dont know what exactly is causing this, but I am resolving for now by
renaming the column so it will update.
Seansan
[Back to original message]
|