How do I clear data in a row for all fields? MySQL
#4

Код:
new str[128];
format(str,128,"UPDATE table_name SET wep0='0', wep1='0', wep2='0', wep3='0', wep4='0', wep5='0', wep6='0',........ wep12='0' WHERE username='%s'",name);
mysql_query(str);
Or
Код:
for(new i=0; i < 13; i++)
{
   new str[128];
   format(str,128,"UPDATE table_name SET wep%d='0' WHERE username='%s'",i,name);
   mysql_query(str);
}
Reply


Messages In This Thread
How do I clear data in a row for all fields? MySQL - by Dokins - 06.04.2014, 03:00
Re: How do I clear data in a row for all fields? MySQL - by VishvaJeet - 06.04.2014, 06:17
Re: How do I clear data in a row for all fields? MySQL - by Dokins - 06.04.2014, 06:50
Re: How do I clear data in a row for all fields? MySQL - by VishvaJeet - 06.04.2014, 06:57
Re: How do I clear data in a row for all fields? MySQL - by Dubya - 06.04.2014, 07:02
Re: How do I clear data in a row for all fields? MySQL - by Dokins - 06.04.2014, 07:07

Forum Jump:


Users browsing this thread: 1 Guest(s)