Search found 5 matches

by gravyface
Thu Apr 06, 2006 11:47 pm
Forum: Databases
Topic: Transactions and MySQL last_insert_id
Replies: 5
Views: 917

Oops, you replied before I edited :) Okay, so you're saying instead of SELECT last_insert_id, use some discerning values from the POST that can uniquely-identify Bob's row and then fetch the id using that? i.e. SELECT id from foo_table where name=bob and foo=bar ? Please comment on my "side que...
by gravyface
Thu Apr 06, 2006 11:28 pm
Forum: Databases
Topic: Transactions and MySQL last_insert_id
Replies: 5
Views: 917

I think I need to clarify: when Bob submits the form, I connect to db, insert the POST data into a table (yes, I validate it/scrub for injection etc.), return the last_insert_id, and disconnect. I then populate the response (the same form) with the POST data (input type=text value=$_POST['foo']), wi...
by gravyface
Thu Apr 06, 2006 10:10 am
Forum: Databases
Topic: Transactions and MySQL last_insert_id
Replies: 5
Views: 917

Transactions and MySQL last_insert_id

Trying to get my head around transactions and guaranteeing that the last_insert_id is the same id that I just inserted. Right now, I'm using PEAR:DB and my table type is InnoDB. I connect, insert a new record, select last_insert_id, and return it, to populate an edit form. I'm concerned that because...
by gravyface
Tue Apr 04, 2006 8:35 am
Forum: General Discussion
Topic: php book recommendations
Replies: 8
Views: 1529

Sticky would be a great idea and thanks to everyone who replied.
by gravyface
Tue Apr 04, 2006 12:11 am
Forum: General Discussion
Topic: php book recommendations
Replies: 8
Views: 1529

php book recommendations

Hello all, I guess I'd consider myself to be an intermediate PHP developer now (been doing Web development for about 5+ years, 2 of those PHP) and would like to learn more. Tutorials online are great, but I prefer books and "offline" reading in general and would like to find out what the b...