First time setting something like this up. So probably
making some major mistakes.
Anyway I get this message : "mysql_error(Resource id

I know it's pointing me to something but not sure what

My suspicion since I'm driving blind :) is that I'm
attempting an insert using invalid or incorrectly
stated variables.


function begin()
function commit()
function rollback()
@mysql_query("ROLLBACK", $link);
@mysql_connect("myserver","myusername", "mypassword")
or die(mysql_error());

@mysql_select_db("mydatabase") or die(mysql_error());
$link = mysql_connect("myserver", "myusername",

$query = "INSERT INTO MyTable (RecordID,UserID,Field3,
Field4, ........., )
// these are all the session variables that I'm trying
// to use to insert value , is that wrong

begin(); // transaction begins
$result = @mysql_query($query, $link);

rollback(); // transaction rolls back
echo "you rolled back";
echo " . mysql_error($link)";
commit(); // transaction is committed
echo "your insertion was successful";

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to