从来没接触过mysql
在通过phpmyadmin运行脚本出错,百思不得其解,大家能否帮忙看看
脚本如下use test;
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_count`(IN departments text,IN locations text)
BEGIN
SELECT COUNT(*) AS counter FROM m_job_job WHERE department = departments AND `location`=locations AND status=1;
END$$报错
#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 3 隔断符是分号
在通过phpmyadmin运行脚本出错,百思不得其解,大家能否帮忙看看
脚本如下use test;
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_count`(IN departments text,IN locations text)
BEGIN
SELECT COUNT(*) AS counter FROM m_job_job WHERE department = departments AND `location`=locations AND status=1;
END$$报错
#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 3 隔断符是分号
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_count`(IN departments text,IN locations text)
SELECT COUNT(*) AS counter FROM m_job_job WHERE department = departments AND `location`=locations AND status=1;
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_count`(IN departments text,IN locations text)
BEGIN
SELECT COUNT(*) AS counter FROM m_job_job WHERE department = departments AND `location`=locations AND status=1;
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_count`(IN departments text,IN locations text)
SELECT COUNT(*) AS counter FROM m_job_job WHERE department = departments AND `location`=locations AND status=1
CREATE DEFINER=`root`@`localhost` PROCEDURE `job_all_page`(IN departments text,IN locations text,IN jbpage int,IN jboffset int)
SELECT id,Description,Qualification,updatetime,position,department,location FROM m_job_job WHERE department = departments AND `location`= locations AND status=1 LIMIT jbpage,jboffset;
弄了半天都没搞明白,结果把mysql从5.0升到5.6还是5.5忘记了
就莫名其妙的好了,mysql的bug也不少呀