"Error in your SQL syntax"

Discussion in 'MySQL' started by kix_mc3, Aug 11, 2008.

  1. #1
    Hello people! I am trying to install a script but when i press "Continue" it says: 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 'release varchar(10) NOT NULL default '' )' at line 1


    How can I make this working? I really tried with differnet ways. If you need some additional info, let me know :).
     
    kix_mc3, Aug 11, 2008 IP
  2. Rory M

    Rory M Peon

    Messages:
    1,020
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You will need to post the query you are sending in order to be sure, but it looks like you have not closed the default ")" element.

    Try changing default")' to default")"'
     
    Rory M, Aug 11, 2008 IP
  3. kix_mc3

    kix_mc3 Active Member

    Messages:
    581
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Ok, not sure about how to explain this. I am tryng to install freedomain.co.nr clone. So, I modified the vars.php file with mysql username, database and password. Everything's fine. I uploaded via FTP. Now, when I am going to "domain.com" it says this:
    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/iuserml/public_html/aa/myred/include/mysql.php on line 14

    Warning: Cannot modify header information - headers already sent by (output started at /home/iuserml/public_html/aa/myred/include/mysql.php:14) in /home/iuserml/public_html/23i/index.php on line 42


    And then i go to "doamin.com/myred/setup.php". Here it says this: The shown values are the ones you edited in the file "vars.php".
    If they are not correct, please edit the variables in "vars.php" and call this page again.
    Else click on "continue" below.


    mySQL Server data

    mySQL server host address: xx
    Your mySQL username:xx
    Your mySQL password: xx
    mySQL database name: xx


    Table names

    The name of the members table: redir
    The name of the options table: options
    The name of the domain table: tld
    The name of the category table: categories
    The name of the statistics table: visitor


    And below that, it says, "Continue". When I press "continue" i am receiving this: 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 'release varchar(10) NOT NULL default '' )' at line 1 and if i reload the page it says this:
    Table 'redir' already exists


    Ok, this is very confusing, but I hope someone is understading what I want to say :).

    Thanks.
     
    kix_mc3, Aug 11, 2008 IP
  4. Rory M

    Rory M Peon

    Messages:
    1,020
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Where did you download this clone?
     
    Rory M, Aug 11, 2008 IP
  5. kix_mc3

    kix_mc3 Active Member

    Messages:
    581
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #5
    kix_mc3, Aug 11, 2008 IP
  6. Mr_2

    Mr_2 Peon

    Messages:
    980
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the solution is create a new database and try to install again using the new database.
     
    Mr_2, Aug 11, 2008 IP
  7. kix_mc3

    kix_mc3 Active Member

    Messages:
    581
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Oh dude, i created thousand of databases and same error :(. If someone could help me, I can give ftp details and all details you need for solve this.
     
    kix_mc3, Aug 12, 2008 IP
  8. pankajthegreat

    pankajthegreat Banned

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Sorry for bump, but I got this thread is Google, and need same help.
     
    pankajthegreat, Nov 6, 2008 IP
  9. pankajthegreat

    pankajthegreat Banned

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Here is the code, first table redir has no error.

    Other four have, can anyone tell me how to fix that.






    // Create the tables
    mysql_query("CREATE TABLE $redir_table ( host varchar(100) NOT NULL default '', name varchar(25) NOT NULL default '', vname varchar(25) NOT NULL default '', passwd varchar(50) NOT NULL default '', email varchar(100) NOT NULL default '', url varchar(100) NOT NULL default '', title varchar(100) NOT NULL default '', descr text NOT NULL, keyw text NOT NULL, counter int(11) default NULL, robots varchar(50) NOT NULL default '', news char(3) NOT NULL default '', revisit text NOT NULL, time varchar(15) NOT NULL default '', ip varchar(20) NOT NULL default '', cat varchar(50) NOT NULL default '', lasttime varchar(15) NOT NULL default '', stats char(3) NOT NULL default '', mail char(3) NOT NULL default '', adtype varchar(15) NOT NULL default '', acticode varchar(15) NOT NULL default '', active char(3) NOT NULL default '', PRIMARY KEY (host), UNIQUE KEY host (host) )") or die (mysql_error());
    mysql_query("CREATE TABLE $options_table ( home varchar(50) NOT NULL default '', sitetitle varchar(150) NOT NULL default '', adminemail varchar(50) NOT NULL default '', username varchar(50) NOT NULL default '', password varchar(50) NOT NULL default '', domainip varchar(15) NOT NULL default '', maindomain varchar(50) NOT NULL default '', mailtoadmin char(3) NOT NULL default '', language varchar(20) NOT NULL default '', multiple char(3) NOT NULL default '', minlength char(2) NOT NULL default '', maxlength char(2) NOT NULL default '', reserved text NOT NULL, forbidden text NOT NULL, autoappr char(3) NOT NULL default '', theme varchar(50) NOT NULL default '', release varchar(10) NOT NULL default '' )") or die (mysql_error());
    mysql_query("CREATE TABLE $domain_table ( domain varchar(50) NOT NULL default '' )") or die (mysql_error());
    mysql_query("CREATE TABLE $category_table ( category varchar(50) NOT NULL default '', advtype varchar(20) NOT NULL default '', adurl varchar(150) NOT NULL default '', height varchar(4) NOT NULL default '', width varchar(4) NOT NULL default '' )") or die (mysql_error());
    mysql_query("CREATE TABLE $visitor_table ( host varchar(100) NOT NULL default '', date varchar(15) NOT NULL default '', ip varchar(20) NOT NULL default '', agent varchar(250) NOT NULL default '', ref varchar(250) NOT NULL default '', timestamp varchar(15) NOT NULL default '' )") or die (mysql_error());
     
    pankajthegreat, Nov 6, 2008 IP
  10. greny

    greny Peon

    Messages:
    162
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    1. Drop the database and create a new and clean one.
    2. Open up vars.php. Edit the mysql parameters so the script can connect to the database.
    3. Open 'setup.php'. Line 87: ... autoappr, theme, release) VALUE... Replace 'release' with 'release_1'.
    4. Same 'setup.php'. Line 549: ... NOT NULL default '', release varchar(10) NOT NULL default '' ... Replace 'release' with 'release_1'.
    5. Open 'mysql.php'. Line 30: $release = $row[release]; replace '[release]' with '[release_1]'.
    6. Open setup.php in your browser.
    7. Config and your done.

    In MySQL5 the keyword 'release' is reserved. So you can't use it or name anything after it.
     
    greny, Nov 6, 2008 IP
  11. pankajthegreat

    pankajthegreat Banned

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks a lot. It worked.

    My site - kc.vc
     
    pankajthegreat, Nov 6, 2008 IP
  12. pankajthegreat

    pankajthegreat Banned

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    One more help needed, I had installed iRedirector script successfully, but was encountering a problem.

    Same with milliscript.
    Everything is working fine, but subdomains are not created in cPanel as a result subdomains aren't working.
     
    pankajthegreat, Nov 6, 2008 IP