A few ideas... [snip] > Anyway I get this message : "mysql_error(Resource id > #2)" > [snip] > @mysql_connect("myserver","myusername", "mypassword") > or die(mysql_error()); > > @mysql_select_db("mydatabase") or die(mysql_error()); > $link = mysql_connect("myserver", "myusername", > "mypassword"); Second mysql_connect(), why? Also, no mysql_select_db for this db connection. Try removing the @s until it's all working. [snip] > begin(); // transaction begins > $result = @mysql_query($query, $link); You are now using $link that has not had a mysql_select_db() > > if(!$result) > { > rollback(); // transaction rolls back > echo "you rolled back"; > echo " . mysql_error($link)"; echo "You rolled back ".mysql_error($link); And place this before rollback() or else the mysql statement in rollback() will probably reset the error. HTH Graham -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php