From: Ondrej J. <ne...@po...> - 2003-05-20 18:29:18
|
> I am trying to enter the current date and time into a date field. Not > a timestamp field because, I don't want this field to change when the > record is updated. > The only approach I can think of, is to add a button or pulldown, on > the modify record page, when clicked it will add in a time. When not > clicked it leaves the date field unmodified. Try this, it works well for me with 5.3 and current CVS as well. $ezin_opts['fdd']['datetime'] = array( 'name'=>Platon::htmlspecialchars2('Date & Time'), 'select'=>'T', 'sort'=>true, 'required'=>true, 'mask'=>'%.10s', 'default'=>date('Y-m-d H:i:s') ); This is rough paste from my phpMyEzin project files, however point on 'default' option above. > I am trying to insert the now() command into the [fdd] area of the > field, although I haven't had good results, hence this post. This will be _probably_ possible in 5.4... Something like: $opts['fdd']['col_name']['sql|AC'] = 'NOW()'; -- _/| Ondrej Jombik - ne...@ph... - http://www.nepto.sk - OJ812-RIPE <_ \ Platon SDG - open source software development - http://platon.sk `\| This message was written with Pine, the fastest IMAP mail client '` |