Tables Help [MYSQL]
#1

So Yeah. Need help creating tables. I'll get this straight.
When I create the Table under 'OnGamemode', when I exceed some like 10 lines, it gives error in Compiling.

Here is a little of the Factions Table.
pawn Код:
mysql_function_query(handle, "CREATE TABLE IF NOT EXISTS `factions` ( \
`Rank1` varchar(50) NOT NULL, \
`Rank2` varchar(50) NOT NULL, \
`Rank3` varchar(50) NOT NULL, \
`Rank4` varchar(50) NOT NULL, \
`Rank5` varchar(50) NOT NULL, \
`Rank6` varchar(50) NOT NULL, \
`Rank7` varchar(50) NOT NULL, \
`Skin0` int(11) NOT NULL DEFAULT '0', \
.... and so on.


And I get this error when I exceed a Specific lines in the Tables. Let's say, if I add
pawn Код:
`Skin1` int(11) NOT NULL DEFAULT '0', \
After Skin 0, It gives that error. When I remove 'one' line. Any could it be, Rank5 for Instance. It'd work fine.
Reply
#2

There's length limit on pawno processor, all you can do is split them up and merge. (Hint : Declare multiple arrays, use strcat then to concatenate them. EDIT : Simply use strins to insert the rest query.)

PS : Those "Rank1", "Rank2", ... "Rank7" is a bad way of creating fields. Try reading this tutorial, it might help you improve the way of creating tables - https://sampforum.blast.hk/showthread.php?tid=420363
Reply
#3

Use this pawn compiler: https://sampforum.blast.hk/showthread.php?pid=2768123#pid2768123
Reply
#4

Quote:
Originally Posted by Lordzy
Посмотреть сообщение
There's length limit on pawno processor, all you can do is split them up and merge. (Hint : Declare multiple arrays, use strcat then to concatenate them.)

PS : Those "Rank1", "Rank2", ... "Rank7" is a bad way of creating fields. Try reading this tutorial, it might help you improve the way of creating tables - https://sampforum.blast.hk/showthread.php?tid=420363
Got it. Thank you Kind sir.

Quote:
Originally Posted by Mionee
Посмотреть сообщение
I downloaded it, and it worked! May God bless you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)