SA-MP Forums Archive
mysql issues... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mysql issues... (/showthread.php?tid=254259)



mysql issues... - sciman001 - 09.05.2011

whats wrong with this:
pawn Код:
new MySQL:connection = mysql_init(LOG_ALL, 1);
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, connection, 1);
mysql_query("CREATE TABLE IF NOT EXISTS `test_table` (\`test_int` INT( 2 ) NOT NULL DEFAULT '0')", -1); //this line has the error!
mysql_close(connection);
errors:
Код:
C:\Documents and Settings\Matt\Desktop\chedder's freeroam\gamemodes\CHEDDER.pwn(74) : error 027: invalid character constant
C:\Documents and Settings\Matt\Desktop\chedder's freeroam\gamemodes\CHEDDER.pwn(74) : error 027: invalid character constant
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
WTH?


Re: mysql issues... - JaTochNietDan - 09.05.2011

You have the escape character in your string for some reason, take it out.

Note: The escape character is "\" without the quotes.

P.S: Apologies for spam, removed the extra post


Re: mysql issues... - sciman001 - 09.05.2011

thats a bit of a spam. lol. thx man!