SQL Query Help
#7

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
pawn Код:
new query[195];
format(query, sizeof(query), "INSERT INTO `acodes` (`thecode`) VALUES ('%s')", string);
mysql_query(string);
Quote:

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 '4PYBsw2z0B68' at line 1.

What I am thinking, is that there is a problem with this random string stock?

pawn Код:
stock randomString(strDest[], strLen = 10)
{
    while(strLen--)
        strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
}
Reply


Messages In This Thread
[fixed] SQL Query Help - by Memoryz - 19.09.2011, 22:43
Re: SQL Query Help - by JaTochNietDan - 19.09.2011, 22:49
Re: SQL Query Help - by Memoryz - 19.09.2011, 22:54
Re: SQL Query Help - by [Diablo] - 19.09.2011, 23:09
Re: SQL Query Help - by Memoryz - 19.09.2011, 23:22
Re: SQL Query Help - by DRIFT_HUNTER - 19.09.2011, 23:25
Re: SQL Query Help - by Memoryz - 19.09.2011, 23:42
Re: SQL Query Help - by Jefff - 20.09.2011, 00:28
Re: SQL Query Help - by Memoryz - 20.09.2011, 00:30
Re: SQL Query Help - by Jefff - 20.09.2011, 00:36

Forum Jump:


Users browsing this thread: 3 Guest(s)