Jump to content
php.lv forumi

mysql INSERT kašķējas


Morphius

Recommended Posts

Tātad, struktūra:

 

DROP TABLE IF EXISTS `field_caption`;
CREATE TABLE IF NOT EXISTS `field_caption` (
 `id` int(5) NOT NULL auto_increment,
 `Cid` int(5) default '0',
 `lang` varchar(10) character set utf8 collate utf8_bin default NULL,
 `caption` varchar(255) default NULL,
 `description` varchar(255) default NULL,
 `match` enum('yes','no') default 'no',
 PRIMARY KEY  (`id`),
 KEY `Cid` (`Cid`),
 KEY `lang` (`lang`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=572 ;

 

query:

 

INSERT INTO field_caption SET id = '40',Cid = '35',lang = 'english',caption = '??? ???',description = '',match = 'no'

 

un problēma: #1064 - 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 'match = 'no'' at line 1

 

Visādi izmēģināju...bet kāmdēļ skripts nevēlas ievietot ierakstu, es neiebraucu...

Ja match'am uztaisa default null, tad arī nevēlas pievienot. Vienīgi kag ieraksts tiek pievienots ir tad, kad query match nemaz neliek...

Manuprāt te ir kāds sīkumiņš...bet vai kāds var pateikt kas par sīkumiņu? ;) Paldies jau iepriekš

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...