I'm running this query in 2 mysql_query calls. I would like to do the most performant thing and run it in one query. Can anyone optimize this for me:
if(mysql_num_rows(eq("select *
from player_data
where uid = $uid")) == 0 )
eq("update player_data
set uid = $uid,
`stat`= REPLACE(`stat`, '$temp_uid', '$uid')
where uid = $temp_uid");
Note: eq is just a wrapper function for mysql_query