It is my understanding that if your auto incrementing index is set to Big_Int instead of Integer, then you need to use last_insert_id() instead of mysql_insert_id() to avoid errors.
So, basically if you just want the last transaction ID in an integer based auto incrementing column, then this should be fine:
<?php $trx_id=mysql_insert_id(); ?>
If your column is Big_Int, however, you need to use the following:
<?php
$select="select last_insert_id()";
$result=mysql_query($select)
or die("Last ID select failed");
$row=mysql_fetch_row($result);
$trx_id=$row[0];
?>
Any comments?