| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 948 人关注过本帖
标题:谁帮我分析下这还原用的SQL语句哪里错了?
只看楼主 加入收藏
z789017890
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-5-21
收藏
 问题点数:0 回复次数:1 
谁帮我分析下这还原用的SQL语句哪里错了?
/*
MySQL Data Transfer
Source Host: localhost
Source Database: sagalogin
Target Host: localhost
Target Database: sagalogin
Date: 2008-5-20 下午 05:49:50
*/

SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for login
-- ----------------------------
DROP TABLE IF EXISTS `login`;
CREATE TABLE `login` (
  `account_id` int(10) NOT NULL auto_increment,
  `username` varchar(25) collate utf8_unicode_ci NOT NULL default '',
  `password` varchar(50) collate utf8_unicode_ci NOT NULL default '',
  `sex` tinyint(3) unsigned NOT NULL default '1',
  `lastlogin` varchar(25) collate utf8_unicode_ci NOT NULL default '',
  `Banned` tinyint(3) NOT NULL default '0',
  PRIMARY KEY  (`account_id`),
  KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Procedure structure for sagaLoginAddUser
-- ----------------------------
DROP PROCEDURE IF EXISTS `sagaLoginAddUser`;
DELIMITER ;;
CREATE DEFINER=`saga`@`localhost` PROCEDURE `sagaLoginAddUser`(
name varchar(25),
pass varchar(50),
gender tinyint(3),
last varchar(25))
BEGIN
INSERT INTO `login` (`username`,`password`,`sex`,`lastlogin`) VALUES (name,pass,gender,last);
END;;
DELIMITER ;

-- ----------------------------
-- Procedure structure for sagaLoginGetAccountId
-- ----------------------------
DROP PROCEDURE IF EXISTS `sagaLoginGetAccountId`;
DELIMITER ;;
CREATE DEFINER=`saga`@`localhost` PROCEDURE `sagaLoginGetAccountId`(name varchar(20))
BEGIN
SELECT `account_id` FROM `login` WHERE `username`=name;
END;;
DELIMITER ;

-- ----------------------------
-- Procedure structure for sagaLoginGetUser
-- ----------------------------
DROP PROCEDURE IF EXISTS `sagaLoginGetUser`;
DELIMITER ;;
CREATE DEFINER=`saga`@`localhost` PROCEDURE `sagaLoginGetUser`(name varchar(20))
BEGIN
SELECT * FROM `login` WHERE `username`=name LIMIT 1;
END;;
DELIMITER ;

-- ----------------------------
-- Procedure structure for sagaLoginUpdateUser
-- ----------------------------
DROP PROCEDURE IF EXISTS `sagaLoginUpdateUser`;
DELIMITER ;;
CREATE DEFINER=`saga`@`localhost` PROCEDURE `sagaLoginUpdateUser`(
name varchar(25),
pass varchar(50),
gender tinyint(3),
last varchar(25))
BEGIN
UPDATE `login` SET `password`=pass, `sex`=gender, `lastlogin`=last WHERE `username`=name;
END;;
DELIMITER ;

-- ----------------------------
-- Records
-- ----------------------------
INSERT INTO `login` VALUES ('1', 'hjk5211_M', 'ac860237b01a769005f289420c3d5c16', '1', '', '0');
INSERT INTO `login` VALUES ('2', 'wer5211_M', '7069391', '1', '', '0');
INSERT INTO `login` VALUES ('3', 'HJK5211', 'c860237b01a769005f289420c3d5c16', '1', '2008-5-20 17:27:47', '0');

帮我看下哪里错了可以吗?

在线等

如果可以的话帮我修正过来!

先谢谢了

原文件献上
sagalogin.rar (1.19 KB)
搜索更多相关主题的帖子: SQL 语句 login Database Source 
2008-05-21 15:42
z789017890
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-5-21
收藏
得分:0 
付上相关信息:

(影响 0 条记录)
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

错误代码: 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 '' at line 7
(耗费 0 ms)

错误代码: 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 'END' at line 1
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

错误代码: 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 '' at line 3
(耗费 0 ms)

错误代码: 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 'END' at line 1
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

错误代码: 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 '' at line 3
(耗费 0 ms)

错误代码: 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 'END' at line 1
(耗费 0 ms)

(影响 0 条记录)
(耗费 0 ms)

错误代码: 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 '' at line 7
(耗费 0 ms)

错误代码: 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 'END' at line 1
(耗费 0 ms)

(影响 1 条记录)
(耗费 0 ms)

(影响 1 条记录)
(耗费 0 ms)

(影响 1 条记录)
(耗费 0 ms)
2008-05-21 16:43
快速回复:谁帮我分析下这还原用的SQL语句哪里错了?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018557 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved