Finde den Verdammten Syntax Fehler nicht:
Serverlog:
SQL
[23:33:17] 1. SELECT Name0 FROM `youtube` WHERE `User` = 'thetvMt2'
[23:33:17] [MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.
[23:33:17] 1. UPDATE `youtube` SET `Name0` = 'Bibi und Tina' WHERE User='thetvMt2',
Code:
new str[120],query[120];
for(new i;i<10;i++)
{
format(str,sizeof(str),"Name%d",i);
format(query,128,"SELECT %s FROM `youtube` WHERE `User` = '%s'",str,SpielerName[playerid]);
printf("1. %s",query);
mysql_query(query); mysql_store_result(); mysql_fetch_row(query); mysql_free_result();
if(strcmp(query,"",true)==0)
{
GetPlayerName(playerid,SpielerName[playerid],MAX_PLAYER_NAME);
format(query,sizeof(query),"UPDATE `youtube` SET `%s` = '%s' WHERE User='%s',",str,inputtext,SpielerName[playerid]);
mysql_query(query);
printf("1. %s",query);
break;
}
}