Greywacke Posted February 13, 2010 Share Posted February 13, 2010 hi, i've been struggling with this for a while now, accidentally posted on the PHP forums but intended for here. ALTER TABLE `8_transactions` UPDATE `timestamp_TransactionEvent` DEFAULT 'CONVERT_TZ(NOW(), "SYSTEM", "+2:00")'; i keep getting the following mysql error, i've tried finding out what the problem is but to no avail. MySQL said: Documentation#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE `timestamp_TransactionEvent` DEFAULT 'CONVERT_TZ(NOW(), "SYSTEM", "+2:00"' at line 1 Link to comment Share on other sites More sharing options...
Greywacke Posted February 13, 2010 Author Share Posted February 13, 2010 unless of course my syntax is just wrong in overall for updating the default value on a field. *checks mysql documentation* Link to comment Share on other sites More sharing options...
Greywacke Posted February 13, 2010 Author Share Posted February 13, 2010 well the following code inserts a default value of 0000-00-00 00:00:00 ALTER TABLE `8_transactions` CHANGE `timestamp_TransactionEvent` `timestamp_TransactionEvent` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NULL DEFAULT 'CONVERT_TZ(CURRENT_TIMESTAMP, "SYSTEM", "+2:00")' COMMENT 'TimeStamp Transaction Event, Current TimeStamp No Keys'; i'd preferrably have this done in the database rather than the code (about 500 insert statements!)how could i go about getting the default value in the field to be SAST instead of the US timezone? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.