How to add a new line [MYSQL]
#1

Hello, how can i add a new line when i want to create my table on mysql

The code is:

PHP код:
mysql_tquery(Database"CREATE TABLE IF NOT EXISTS `PLAYERS` (`ID` int(11) NOT NULL AUTO_INCREMENT,`USERNAME` varchar(24) NOT NULL,`PASSWORD` char(65) NOT NULL,`SALT` char(11) NOT NULL,`SCORE` mediumint(7), `KILLS` mediumint(7), `CASH` mediumint(7) NOT NULL DEFAULT '0',`DEATHS` mediumint(7) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), UNIQUE KEY `USERNAME` (`USERNAME`))"); 
I want to make it like this:

PHP код:
mysql_tquery(Database"CREATE TABLE IF NOT EXISTS 'PLAYERS' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'USERNAME' varchar(24) NOT NULL,
'PASSWORD' char(65) NOT NULL 
ETc.. how can i make it like that?
Reply
#2

Код:
mysql_tquery(Database, "CREATE TABLE IF NOT EXISTS `PLAYERS` (\
`ID` int(11) NOT NULL AUTO_INCREMENT, \
`USERNAME` varchar(24) ...
Reply
#3

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Код:
mysql_tquery(Database, "CREATE TABLE IF NOT EXISTS `PLAYERS` (\
`ID` int(11) NOT NULL AUTO_INCREMENT, \
`USERNAME` varchar(24) ...
PHP код:
error 075input line too long (after substitutions)
error 037invalid string (possibly non-terminated string)
error 017undefined symbol "CREATE"
error 017undefined symbol "TABLE"
fatal error 107too many error messages on one line 
PHP код:
mysql_tquery(Database"CREATE TABLE IF NOT EXISTS `PLAYERS` (\
    `ID` int(11) NOT NULL AUTO_INCREMENT, \
      `USERNAME` varchar(24) NOT NULL, \
      `PASSWORD` char(65) NOT NULL, \
      `SALT` char(11) NOT NULL, \
      `SCORE` mediumint(7), \
      `CASH` mediumint(7) NOT NULL DEFAULT '0', \
      `DEATHS` mediumint(7) NOT NULL DEFAULT '0', \
     PRIMARY KEY (`ID`), \
     UNIQUE KEY `USERNAME` (`USERNAME`))"
); 
Reply
#4

Since pawnc has this limitation. You can either switch to a modern day pawn compiler like JIT;
Or you can use "strcat" and concatenate parts of your literal string into one local string variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)