You are here: Re: Problem with NOW() with PHP and MySQL « All PHP « IT news, forums, messages
Re: Problem with NOW() with PHP and MySQL

Posted by Tom on 03/28/07 17:09

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация