From: Bailey, K. <kev...@me...> - 2003-04-11 16:20:52
|
This is really easy using the built-in feature of MySQL. Create a field with timestamp type last_update timestamp(8) Yes NULL =20 and use this for you definition file. $opts['fdd']['last_update'] =3D array( 'name'=3D>'Last update', 'select'=3D>'T', 'type'=3D>'timestamp', 'maxlen'=3D>8, 'nowrap'=3D>false, 'required'=3D>true, 'options'=3D>'RVD', 'sort'=3D>true ); When you update a record, the last_update field gets updated = automatically. Kevin Kevin Bailey Network Engineer - Communications Services Mentor Graphics - www.mentor.com Wilsonville, OR USA e. kev...@me... -----Original Message----- From: Ondrej Jombik [mailto:ne...@po...] Sent: Friday, April 11, 2003 8:49 AM To: Thomas G=F6tz Cc: php...@li... Subject: Re: [PHPMyEdit-Discuss] question about using triggers > now I want the 'date' field to be automatically updated whenever I = make a > change to one of the other entries via phpMyEdit. I guess this can be > realized with a 'update_after' trigger. Could someone maybe show me = an > example of how this .inc file should look like ? http://www.platon.sk/forum/projects/viewtopic.php?p=3D189#189 -- _/| Ondrej Jombik - ne...@ph... - http://www.nepto.sk - = OJ812-RIPE <_ \ Platon SDG - open source software development - = http://platon.sk `\| UNIX is user friendly. It's selective about who its friends = are! '` ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The = debugger=20 for complex code. Debugging C/C++ programs can leave you feeling lost = and=20 disoriented. TotalView can help you find your way. Available on major = UNIX=20 and Linux platforms. Try it free. www.etnus.com _______________________________________________ Phpmyedit-discuss mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpmyedit-discuss |