如何在将数据库导入phpmyadmin cpanel时修复此错误:
SQL query:
--
-- Database: `news_letter`
--
-- --------------------------------------------------------
--
-- Table structure for table `banner_tbl`
--
CREATE TABLE IF NOT EXISTS `banner_tbl` (
`ban_id` INT( 11 ) NOT NULL ,
`banner_img` VARCHAR( 255 ) NOT NULL ,
`date` VARCHAR( 255 ) NOT NULL
) ENGINE = INNODB AUTO_INCREMENT =158 DEFAULT CHARSET = latin1;
MySQL said: Documentation
#1046 - No database selected
答案 0 :(得分:2)
在.sql文件
上添加以下行CREATE DATABASE IF NOT EXISTS `news_letter`;
USE `news_letter`;