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 ( 4 ) unsigned NOT NULL auto_increment ,
opponentname varchar ( 128 ) NOT NULL default '' ,
opponentown tinyint ( 1 ) unsigned NOT NULL default '0' ,
opponenturl varchar ( 80 ) NOT NULL default '' ,
opponentemail varchar ( 80 ) NOT NULL default '' ,
opponentphone varchar ( 80 ) NOT NULL default '' ,
opponentcontact varchar ( 255 ) NOT NULL default '' ,
published tinyint ( 1 ) NOT NULL default '0' ,
areaid int ( 4 ) unsigned NOT NULL default '0' ,
founded varchar ( 4 ) NOT NULL default '' ,
colors varchar ( 40 ) NOT NULL default '' ,
stadium varchar ( 40 ) NOT NULL default '' ,
short varchar ( 4 ) NOT NULL default '' ,
imagefiles varchar ( 150 ) NOT 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 , '' , '' , '' , '' , 1 , 1 , '' , '' , '' , 'MANU' );
INSERT INTO ` #_league_opponents ` (` opponentid `, ` opponentname `, ` opponentown `, ` opponenturl `, ` opponentemail `, ` opponentphone `, ` opponentcontact `, ` published `, ` areaid `, ` founded `, ` colors `, ` stadium `, ` short `) VALUES ( '' , 'Arsenal' , 0 , '' , '' , '' , '' , 1 , 1 , '' , '' , '' , '' );
Thank you big time in advance
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 #__
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
Forum Rules
Bookmarks