grlayouts Posted October 2, 2007 Share Posted October 2, 2007 what have a missed its not runing all the queries. $txsql = "UPDATE players set cashaccount=cashaccount+5, UPDATE players set rank=Donator where user='$_POST[item_name]', insert into log (owner,log) values(1,'<b>$_POST[item_name] Has just bought upgrade 1</b>')"; $resultat_txsql = mysql_query($txsql); Link to comment https://forums.phpfreaks.com/topic/71509-quick-query/ Share on other sites More sharing options...
shocker-z Posted October 2, 2007 Share Posted October 2, 2007 <?php $txsql = "UPDATE players set cashaccount=cashaccount+5, rank='Donator where user='$_POST[item_name]'"; $txsql2 = "insert into log (owner,log) values(1,'$_POST[item_name] Has just bought upgrade 1')"; $resultat_txsql = mysql_query($txsql) or die('Error updating players: '.mysql_error()); $resultat_txsql2 = mysql_query($txsql2) or die('Error inserting logs: '.mysql_error()); ?> That should/may work but if your doing an update you need a WHERE player = '$_POST[player]' This toptaly depends on your table. what columns have you got in your table? You seem to be totaly confused about SQL so you may need to have a look at SQL tutorials. Liam Link to comment https://forums.phpfreaks.com/topic/71509-quick-query/#findComment-359981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.