the first field in my table is a timestamp which i want automatically filled with current date/time when i add a new record, as well as modify existing record. the modify works fine, but add fills with 0s. add works ok until i use the Resync Database function in Admin. this changes default to CURRENT_TIMESTAMP and changes NOT NULL to NO. when i have NOT NULL = YES and blank default value, it works. why does resync change these properties and is there something i can put in default that will work?
Aug 7, 2010, 7:00 AM
Veteran / Moderator (17364 posts)
Aug 7, 2010, 7:00 AM
Post #2 of 5
Views: 2352
As a default, try NOW() .. this should put the current timestamp in there.
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Aug 7, 2010, 7:51 AM
User (393 posts)
Aug 7, 2010, 7:51 AM
Post #3 of 5
Views: 2348
this is so weird to me! ok, i changed not null to YES and put now() in default. it still filled with 0000-00.... when i added a record. then i did resync database. it changed column properties not null to NO and default value to 0000-00-00.... but now it works. i don't understand, but it works. thanks!
Aug 7, 2010, 7:53 AM
Veteran / Moderator (17364 posts)
Aug 7, 2010, 7:53 AM
Post #4 of 5
Views: 2346
heheh as long as it works - don't moan :D (I know I dont when something suddenly starts working
)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

