magento - mysql drop statement with -- -
what difference between drop table , --drop table in mysql
for example: i'm getting error if use -- in other places of magento using -- before drop.
--drop table if exists {$this->gettable('faq/dinkchika')}; create table if not exists {$this->gettable('faq/dinkchika')} ( `faq_id` int(11) not null auto_increment, `faq_question` varchar(255) default null, `faq_answer` varchar(255) default null, primary key (`faq_id`) ) engine=innodb default charset=utf8; ");
use white space after -- ,if not using whitespace after -- not count comment.after whitespace query this. -- drop table if exists {$this->gettable('faq/dinkchika')}; create table if not exists {$this->gettable('faq/dinkchika')} ( `faq_id` int(11) not null auto_increment, `faq_question` varchar(255) default null, `faq_answer` varchar(255) default null, primary key (`faq_id`) ) engine=innodb default charset=utf8; "); or may use #(hash) , try this: drop table if exists table_name; , continue creating table, guaranteed no longer exist. hope you..
Comments
Post a Comment