The problem with this is that mysql_query only returns a query resource, not the result of the query.
Instead you should do,
$sql_id = "SELECT LAST_INSERT_ID() FROM Purchases";
$res = mysql_query($sql_id);
$row = mysql_fetch_array($res);
$purchaseID = $row[0];
echo $PurchaseID;
or, as @SpacePhoenix; says, use [fphp]mysql_insert_id[/fphp]
Also note that it says in the manual
The value of mysql_insert_id() is affected only by statements issued within the current client connection. It is not affected by statements issued by other clients.
– http://dev.mysql.com/doc/refman/5.0/es/mysql-insert-id.html
So concurrent inserts is not really an issue here; unless -maybe- you’re using multiple threads that use the same connection, but then you’d have bigger fish to fry than the mysql_insert_id() function anyway 
As for the multiple inserts, that’s also a problem when you’re not using last_insert_id(), so it’s not an argument against using last_insert_id(). At most it’s an argument not to use multiple inserts on a table with an AUTO_INCREMENT field if you need the generated ID values afterward because the behavior is undefined!
Also,
[QUOTE=itmitică;5140450]No need to inform MySQL.com sir, they already know: http://bugs.mysql.com/bug.php?id=34319.[/QUOTE]
That’s not even a bug. As it says further down:
Thank you for the bug report. Currently that is the expected behavior:
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
"Note
For a multiple-row insert, LAST_INSERT_ID() and mysql_insert_id() actually return the AUTO_INCREMENT key from the first of the inserted rows. This allows multiple-row inserts to be reproduced correctly on other servers in a replication setup."
The “bug” reporter then goes on about the name of the function which incorrect, as opposed to the behavior of the function. He has a point, but your argument that last_insert_id() is flawed in MySQL is invalid; at least when based on this “bug” report.