Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #630 YEAR and TIMESTAMP type in mysql database not handled correctly
Submitted: 2004-01-27 10:16 UTC
From: windey at lpthe dot jussieu dot fr Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.2 OS: Mac OS 10.2.8 darwin 6.8
Roadmaps: (Not assigned)    
Subscription  


 [2004-01-27 10:16 UTC] windey at lpthe dot jussieu dot fr
Description: ------------ In forms (built with html_quickform); updating the mysql database with dataobjects methods : 1) fields of type YEAR in MYSQL are handled incorrectly and end up the the database with a default of 1970 A fix was proposed by Alan Knowles : quote : can you try adding this to Generator.php - in the big switch case section. case 'YEAR': $type = DB_DATAOBJECT_INT; break; end quote : THIS DOES WORK 2) TIMESTAMP : the issue sounds more complex here although the same fix as above but for TIMESTAMP helps to some extent. A single TIMESTAMP field should be automatically updated to the current unix timestamp (except in some situations) the normal mysql behaviour should be for example UPDATE `table` SET `last_update` = NOW('00000000000000') while DatabaseObject replaces it by UPDATE `table` SET `last_update` = '00000000000000' which is the wrong behaviour. Thanks Paul Windey

Comments

 [2004-01-29 09:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!