"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote: > Steve Werby wrote: > > > Exactly. It sounds like you're doing INSERTs so unless you're doing an > > UPDATE or SELECT that can give unexpected results if another instance of the > > script is running at the same time or you have other scripts accessing the > > same files/tables that may run at the same time you're ok. > > Well now, I didn't say I was only doing INSERTs.
Best guess based on limited information. My bad. :-) > After parsing the email, I > need to do a quick select in the DB to see if the customer (placing the order) > already exists in our DB, and if they don't, just plain INSERT. Otherwise, I > need to do some more work, which will require an UPDATE on that same record. It sounds like the only possible conflict is if a customer not in the system places two orders that arrive at about the same time and the second SELECT is done before the first INSERT is committed. Experience suggests this isn't very likely...so unlikely I wouldn't even worry about it unless there's a reasonable probability that INSERTs would take a long time and new customers would fire off two orders at the same time (double send in Outlook or refreshing via a web form?)...and since I don't have all of the details and I'm likely misinterpreting the whole application I'll leave it at that. > I'm probably going to break the DB into separate tables (one containing the > customer info, with a matching ID in another table which contains the customer > orders). FWIW, that's how I'd approach it. > (I know, this gets complicated by the minute. ;) ) Definitely harder than a "hello world", but it sounds manageable. Have fun with it! -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]