I need help with implementing MySQL transactions with PHP. Specifically, I'm confused between the flags `WITH CONSISTENT SNAPSHOT`, `READ WRITE`, and `READ ONLY`, what their differences are, and how they relate to table locking. I already read the MySQL reference manual but I'm still confused.

Member Avatar
Member Avatar
+1 forum 6

try { mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); commit() } catch (Exception $e) { rollback() } I would like so that if any of the queries within the try { } fails, to go to the exception and rollback the transaction, and commit otherwise. What kind of things will it throw an exception for I.E if database is down? etc. Another thing I've noticed is if something is rolledback, then a new record is made the primary key seems to have auto incremented twice, is this something that can be avoided somehow, or are tables which contains rows like (1, …

Member Avatar
Member Avatar
+0 forum 6

Hello yall, I'm starting to work with Paypal (just signed up for x.com and sandbox). I was looking at the DoDirectPayment API for credit card transactions. One of the required fields kinda took me by surprise. Here it is. [CODE] IPADDRESS (Required) IP address of the buyer's browser. Note: PayPal records this IP addresses as a means to detect possible fraud. Character length and limitations: 15 single-byte characters, including periods, for example, 255.255.255.255 [/CODE] How do i obtain the IPaddress of a buyer with PHP?? I'm assuming it can't be as easy as 192.168.0.1 right?? lol

Member Avatar
Member Avatar
+0 forum 1

The End.