M. Bader wrote:
Hi,
i'm struggling with updating session expire times in my login table.
Can you tell me, how to correctly add an amount of seconds (after that
the session expires) to a datetime field?
when i do the insert for a new login, or an update, the expire field
will alway end up containing zeros
below are my statements and structure, (MySQL version: 4.0.13)
Thanks for any help
Maik
INSERT INTO `user_login` (
`id_kontakt`,
`id_user`,
`session`,
`expire`,
`ip`,
`browser`,
`id_sprache`,
`username`)
VALUES (
25,
39,
'1061461259142493',
(NOW()+SEC_TO_TIME(6000)),
'192.168.0.3',
'Opera/7.11 (Windows NT 5.0; U) [de]',
1,
'maik'
);
UPDATE `user_login` SET `expire` = (NOW()+SEC_TO_TIME(6000))
WHERE `session` LIKE '1061461259142493';
UPDATE `user_login` SET `expire` = (NOW() + 6000)
WHERE `session` LIKE '1061461259142493';
--
Sebastian Mendel
www.sebastianmendel.de
www.tekkno4u.de
www.nofetish.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]