www.webdeveloper.com
Results 1 to 3 of 3

Thread: Error Inserting data???????

  1. #1
    Join Date
    Mar 2005
    Posts
    262

    Angry Error Inserting data???????

    can someone please help me, and tell me why I keep getting this error, I believe that it is the autoincremented opponentid as I'm inserting '', is that right.


    SQL Error:
    PHP Code:
    SQL Error DB function failed with error number 1146
    Table 
    'appsjame_uwafc.#_league_opponents' doesn't exist SQL=INSERT INTO `#_league_opponents` (`opponentid`, `opponentname`, `opponentown`, `opponenturl`, `opponentemail`, `opponentphone`, `opponentcontact`, `published`, `areaid`, `founded`, `colors`, `stadium`, `short`) VALUES ('', 'Arsenal', 0, '', '', '', '', 1, 1, '', '', '', '');
    SQL =

    INSERT INTO `#_league_opponents` (`opponentid`, `opponentname`, `opponentown`, `opponenturl`, `opponentemail`, `opponentphone`, `opponentcontact`, `published`, `areaid`, `founded`, `colors`, `stadium`, `short`) VALUES ('', '
    Arsenal', 0, '', '', '', '', 1, 1, '', '', '', ''); 
    SQL Query:
    PHP Code:
    CREATE TABLE #__league_opponents (
          
    opponentid smallint(4unsigned NOT NULL auto_increment,
          
    opponentname varchar(128NOT NULL default '',
          
    opponentown tinyint(1unsigned NOT NULL default '0',
          
    opponenturl varchar(80NOT NULL default '',
          
    opponentemail varchar(80NOT NULL default '',
          
    opponentphone varchar(80NOT NULL default '',
          
    opponentcontact varchar(255NOT NULL default '',
            
    published tinyint(1NOT NULL default '0',
            
    areaid int(4unsigned NOT NULL default '0',
            
    founded varchar(4NOT NULL default '',
          
    colors varchar(40NOT NULL default '',
          
    stadium varchar(40NOT NULL default '',
          
    short varchar(4NOT NULL default '',
          
    imagefiles varchar(150NOT NULL default '',
          
    PRIMARY KEY  (opponentid)
        ) 
    TYPE=MyISAM

    INSERT INTO 
    `#__league_opponents` (`opponentid`, `opponentname`, `opponentown`, `opponenturl`, `opponentemail`, `opponentphone`, `opponentcontact`, `published`, `areaid`, `founded`, `colors`, `stadium`, `short`) VALUES ('''Mancester'0''''''''11'''''''MANU');

    INSERT INTO `#_league_opponents` (`opponentid`, `opponentname`, `opponentown`, `opponenturl`, `opponentemail`, `opponentphone`, `opponentcontact`, `published`, `areaid`, `founded`, `colors`, `stadium`, `short`) VALUES ('''Arsenal'0''''''''11''''''''); 
    Thank you big time in advance

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    are you creating the table right as you insert the data? could you should the programming logic maybe?

    Nevermind that part

    just noticed this though:

    Code:
    INSERT INTO `#__league_opponents`
    Code:
    INSERT INTO `#_league_opponents`
    See the difference in the two lines? one has #__ and the other is $_. Your table is #__
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Mar 2005
    Posts
    262
    Thank you I see no that one of them has 1 underscore while the other has 2, thank you, I'll see if that works cheers chazzy, I can so you the logic if you want?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles