Actually You can build Transactions before update or inserting data into database. also don't work with out proper primary and foreign keys in you tables. Try to use autogenerate option for primary keys. I suppose you are using mysql database, I dont know about mysql transactions, but I use oracle 10g. If I have to execute set of 2 query in the manner that 2 should succeed or no query should execute.
$query1="some insert";$statement1 = oci_parse($connection, $query1);if ((oci_execute($statement1,OCI_DEFAULT))){[indent] $query2="some more insert"; $statement2 = oci_parse($connection, $query2); if ((oci_execute($statement2,OCI_DEFAULT))) [indent] oci_commit($connection)); [/indent] else[indent] oci_rollback($connection)); [/indent][/indent]}else{ oci_rollback($connection)) ;}
You please specify what problem exactly you are facing. Why you feel that you data is not concurrent.
Notice from rvalkass:
Code needs to go inside Code BBTags. List of BBCodes