Bottom
Table creation failed error after initialising Weather_1.30
  • Posted: 20.04.2004, 05:23
     
    marvc
    registered:
     April 2004
    Status:
    offline
    last visit:
    20.04.04
    Posts:
    1
    I have a very frustrating issue that's preventing me from installing and enjoying this Weather module on my PN site. I copy the weather folder over to /modules and get a "Table creation failed" error when I try to initialise it. I also only see that 3 tables are created during the initialising. Those tables are:
    nuke_wthr_cache
    nuke_wthr_pkg
    nuke_wthr_user

    I can't seem to get past this. Can anyone explain this issue to me and possible help me resolve it? I'm running Windows 2003 server w/MySQL, 5.0, php4.3.4, and IIS.

    Thanks
  • Posted: 21.04.2004, 12:33
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Hello,
    normaly the module should create 6 tables (in that order) :
    nuke_wthr_pkg
    nuke_wthr_cache
    nuke_wthr_user
    nuke_wthr_subdiv
    nuke_wthr_region
    nuke_wthr_country
    nuke_wthr_city
    So apparently it's the creation of the nuke_wthr_subdiv wich is failing but I can't see why. The sql statement is :
    Code
    $sql = "CREATE TABLE $subdivtable (
                $subdivcolumn[subdiv_title] varchar(50),
                $subdivcolumn[subdiv_id] int(4) DEFAULT '0' NOT NULL auto_increment,
                $subdivcolumn[country_id] int(4) NOT NULL,
                PRIMARY KEY(subdiv_id))";

    If you pm me your mail I will send you a special pninit.php file which display the table name (just to be sure it's nuke_wthr_subdiv) and the error number on screen when there is an error.
    With that info we will try to found what is going wrong !!
  • Posted: 09.05.2004, 23:42
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    I sent the PM but I'm not sure if you received it so I'm here again asking for some assistance on getting this to work. I'm using MySQL 5 on my w2k3 server so do I create this as is or is there anything I need to format differently to get this to work? Also will creating this solve my problem?

    Thanks
  • Posted: 09.05.2004, 23:43
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    AnonymousI sent the PM but I'm not sure if you received it so I'm here again asking for some assistance on getting this to work. I'm using MySQL 5 on my w2k3 server so do I create this as is or is there anything I need to format differently to get this to work? Also will creating this solve my problem?

    And me email again is marvc@bellsouth.net

    Thanks
  • Posted: 10.05.2004, 01:22
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    I get the following error when trying to create this table on my w2k3 server that's running mysql 5.0:

    ERROR 1064 (42000): 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 '$sql
    = "CREATE TABLE $subdivtable (
    $subdivcolumn[subdiv_title] varchar(50),
    $su' at line 1

    Any ideas on how to resolve this?
    Thanks
  • Posted: 10.05.2004, 07:13
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Hello,
    Did you check before installation that you did have any nuke_wthr_xxx table already in your database ? If yes I don't see what is the the problem.
    Unfortunately I don't have mysql v5 installed on any site so I can't test :(
    $subdivtable is the 4th table to be created in pninit.php. So apparently the 3 first don't give any trouble.
    the lines are :
    Code
    $sql = "CREATE TABLE $subdivtable (
                $subdivcolumn[subdiv_title] varchar(50),
                $subdivcolumn[subdiv_id] int(4) DEFAULT '0' NOT NULL auto_increment,
                $subdivcolumn[country_id] int(4) NOT NULL,
                PRIMARY KEY(subdiv_id))";
        $dbconn->Execute($sql);

    So the only diffrence with the other is the use of auto_increment but I fail to see why this could lead to a problem. I will see if I can find anything.
    THe very annoying thing for you is that when pninit fails, you have to manualy suppress the tables created if you want to try again because the next time you run pninit it will fail because the tables are already there.
  • Posted: 10.05.2004, 20:16
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Well,
    There was a problem with weather version 1.30 and mysql version 4.1.xx and posterior.
    As I'm not sure that another user with the same problem can find the solution in this thread, I will post it under a more expliciit title !!
    Note this problem will also be corrected in 1.31
Quick reply
 
  • Options
Code:
Font color:  
Font size: