From: jim k. <jim...@ya...> - 2003-04-02 20:16:57
|
you might be missing timing if you don't somehow lock the record from the time the user requests it for editing to the time where the user submits the udpated record if not, any changes that come in via some third party while the user is editing the record will be lost --- Hugues Bernard <hbe...@gy...> wrote: > Hi, > > Playing with triggers, it seems to me that one case is missing. > > Let me explain : > > Currently, before_update_triggers are called just before sending data to > the database. > It means that a user may have edited the record before the call. > > The user won't be able to _commit_ the changes, but there is no way to > forbid record edition with current triggers. > > I have tables with lot of fields and want to avoid the user doing his > stuff and then be notified (after clicking on the change or apply > button) that he can't, and that he'll have to try again later. > > So, I added a [trigger][update][pre] = something.inc > and hack a bit the display_record function in order to include this file > _before_ the Change View. > > A simple (but very useful, I think) use-case is to be able to prevent > the user to edit a record that is (for example) locked by another (using > extra time and IP fields in the table). > > Sorry for bad english. I hope you'll understand what I mean. > > Do you want a patch and sample use ? > Or am I missing something ? > > Hugues > > > -- > Hugues Bernard <hbe...@gy...> > gynov.org > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Phpmyedit-discuss mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpmyedit-discuss __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com |