I don't know which version of MySQL you're running and I'm not a MySQL expert myself, but perhaps adding "AS" between the table names and its alias may help? Or maybe it's the new line characters? Have you tried checking for errors from MySQL first?
php code:
<?php
$result = mysql_query("SELECT a.*, b.playername "
. "FROM upgrades AS a INNER JOIN zm_timetracker AS b ON a.steamid = b.steamid "
. "WHERE b.playername LIKE '%$search2%'") or die("MySQL error: " . mysql_error());
?>
If that doesn't resolve the issue, try running the query in something like phpMyAdmin and see if the query works as expected. At least that'll tell us whether it's the query or the PHP that's faulty.