解决方案 »

  1.   

    php 限定一次只能执行一条 sql 指令
    你这是两条,自然就不行了
      

  2.   

    应该是分开执行两条语句,DROP TABLE if exists `install`,`user`,`theme`,`reply`;执行一次,第二次执行creat后面的
      

  3.   

    $sql1=<<<EOF
    DROP TABLE if exists `install`,`user`,`theme`,`reply`;
    EOF;
    $sql2=<<<EOF
    create table `install` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `themenum` int(11) NOT NULL,
    `webtitle` text NULL,
    `weblogo` text NULL,
    `webkeywords` text NULL,
    `webdescription` text NULL,
    `webtop` text NULL,
    `webmenu` text NULL,
    `webfooter` text NULL,
    `custom1` text NULL,
    PRIMARY KEY (`id`),
       KEY `id` (`id`)
    );
    EOF;$resql1=mysql_query($sql1);
    $resql1=mysql_query($sql2);if ($resql1 && resql2){
        //success
    }else{
        //error
    }