php - Hold record id for ticketing system problem -



php - Hold record id for ticketing system problem -

ok have custom ticketing scheme developed in php/postgresql. how works info entered, click submit, ticket number shown. like, ticket number shown, come in information, click submit.

now know can create blank record , utilize record id update when user submits.

i wanted know if there better/alternative way in doing this?

some key points:

record id pk, auto increments record id's must in order, no skipping record id numbers

the problem end user start ticket id process , not click submit result in blank record. might best way proceed.

any ideas or best approach?

edit: understand gripes , need finish requested action, looks i'm going dealing blank records. shouldn't happen wanted see if had deal before. input

there no practical way this.

it's not prudent lock tables or utilize transactions app must wait additional user input. means tickets info have gaps between them. silly requirement on client's part. managers should have done improve job explaining why getting ticket number afterward way go (race conditions):

obtaining next auto-increment id requires access resource. means there must command resource. imagine implementing approach @ deli. 1 person takes number , decides want. person tries grab number. must somehow stop them (lock tables) or numbers might out of order should first person leave! of course of study silly way run business. if first person decides not order anything, should able throw ticket away (you've got on 4 billion tickets -- , can increment -- you'll fine).

php postgresql

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -