sql 语句在phpmyadmin运行正常,但在PHP无法运行 mysqlsqlphp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 php 限定一次只能执行一条 sql 指令你这是两条,自然就不行了 应该是分开执行两条语句,DROP TABLE if exists `install`,`user`,`theme`,`reply`;执行一次,第二次执行creat后面的 $sql1=<<<EOFDROP TABLE if exists `install`,`user`,`theme`,`reply`;EOF;$sql2=<<<EOFcreate 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} 有关mysql +PHP +apache 安全的 措施 IIS的unlink()没反应 PHP怎样连接Sql Server数据库 关于iconv遇到特殊字符 move_uploaded_file移动文件后,文件名变成乱码! XML_RSS使用问题 文件下载这段代码哪里出问题了? PHP如何A文件如何从B文件中获取信息?非Form表格传递变量问题 如何取得当月的第一天和最后一天! 设置session必须写session_start()吗? 请教各位老师如何备份PHP网站的数据库 求助,PHP入门
你这是两条,自然就不行了
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
}