Nice way to find mysql error code… just relpace from where it says or die in your script.
or die("A MySQL error has occurred.Error: (" . mysql_errno() . ") " . mysql_error());