gpt4 book ai didi

php - 导入时出现 SQL 语法错误

转载 作者:行者123 更新时间:2023-11-29 19:33:40 25 4
gpt4 key购买 nike

我想将 SQL 导入到新数据库中。

这是我的 SQL 代码:

-- phpMyAdmin SQL Dump
-- version 2.11.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 03, 2013 at 05:43 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `rss_aggregator`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--

CREATE TABLE IF NOT EXISTS `admin` (
`id` varchar(1) NOT NULL,
`admin` varchar(40) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `admin`, `password`) VALUES
('1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3');

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE IF NOT EXISTS `categories` (
`category_id` int(12) NOT NULL auto_increment,
`category_title` varchar(255) character set utf8 collate utf8_persian_ci NOT NULL,
`category_order` int(12) NOT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`category_id`, `category_title`, `category_order`) VALUES
(1, 'cate1', 2),
(2, 'cate2', 1);

-- --------------------------------------------------------

--
-- Table structure for table `feeditems`
--

CREATE TABLE IF NOT EXISTS `feeditems` (
`item_id` int(12) NOT NULL auto_increment,
`item_title` varchar(255) NOT NULL,
`item_url` varchar(255) NOT NULL,
`item_category_id` int(12) NOT NULL,
`item_feed_id` int(12) NOT NULL,
`item_details` text character set utf8 collate utf8_persian_ci NOT NULL,
`item_datetime` varchar(100) NOT NULL,
`item_unix_datetime` int(12) NOT NULL,
`item_hits` int(12) NOT NULL,
`item_published` int(1) NOT NULL,
`item_pinned` int(1) NOT NULL,
PRIMARY KEY (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `feeditems`
--


-- --------------------------------------------------------

--
-- Table structure for table `feeds`
--

CREATE TABLE IF NOT EXISTS `feeds` (
`feed_id` int(12) NOT NULL auto_increment,
`feed_url` varchar(255) NOT NULL,
`feed_title` varchar(100) NOT NULL,
`feed_logo` varchar(255) NOT NULL,
`feed_category_id` int(12) NOT NULL,
`feed_last_update` int(12) NOT NULL,
`feed_items` int(3) NOT NULL,
PRIMARY KEY (`feed_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `feeds`
--

INSERT INTO `feeds` (`feed_id`, `feed_url`, `feed_title`, `feed_logo`, `feed_category_id`, `feed_last_update`, `feed_items`) VALUES
(1, 'http://url1', 'item1', '86371381906650.jpg', 1, 1381906864, 5),
(2, 'http://url2', 'item2', '33781381908943.jpg', 2, 1383498344, 10);

-- --------------------------------------------------------

--
-- Table structure for table `setting`
--

CREATE TABLE IF NOT EXISTS `setting` (
`id` int(1) NOT NULL,
`seo_title` varchar(255) NOT NULL,
`seo_keywords` text NOT NULL,
`seo_description` text NOT NULL,
`site_template` varchar(100) NOT NULL,
`direct_links` int(1) NOT NULL,
`new_items_number` int(2) NOT NULL,
`top_hits_items_number` int(2) NOT NULL,
`category_items_number` int(2) NOT NULL,
`ad_slot_728` text NOT NULL,
`ad_slot_300` text NOT NULL,
`friendly_urls` int(1) NOT NULL,
`pagination_style` int(1) NOT NULL,
`display_rss` int(1) NOT NULL,
`display_category_rss` int(1) NOT NULL,
`rss_items_number` int(4) NOT NULL,
`facebook` varchar(255) NOT NULL,
`twitter` varchar(255) NOT NULL,
`google_plus` varchar(255) NOT NULL,
`display_calendar` int(1) NOT NULL,
`google_analytics` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `setting`
--

INSERT INTO `setting` (`id`, `seo_title`, `seo_keywords`, `seo_description`, `site_template`, `direct_links`, `new_items_number`, `top_hits_items_number`, `category_items_number`, `ad_slot_728`, `ad_slot_300`, `friendly_urls`, `pagination_style`, `display_rss`, `display_category_rss`, `rss_items_number`, `facebook`, `twitter`, `google_plus`, `display_calendar`, `google_analytics`) VALUES
(1, 'title of the page', 'keyworks', 'desc', 'v2', 0, 15, 15, 15, '<img src="upload/top.jpg" />', '<img src="upload/left.jpg" />', 1, 2, 1, 1, 10, 'http://www.facebook.com', 'http://twitter.com', '', 0, '');

当我想将其导入新数据库时,我收到此错误:

 #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 'phpMyAdmin SQL Dump -- version 2.11.9.2

最佳答案

我重新组织了。

数据库名称:deneme

PHP版本:7.0.13

我用土耳其语准备的。但语法是相同的

try

Pic

关于php - 导入时出现 SQL 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41652007/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com