-- 查看是否全局开启事件
show variables like 'event_scheduler';
-- 设置事件
set global event_scheduler = on;
-- 建立事件
DELIMITER $$
CREATE DEFINER=`root`@`localhost` EVENT `del_music_tips` ON SCHEDULE EVERY 1 DAY STARTS '2018-07-16 12:00:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT '事件备注' DO
BEGIN
-- [这里写SQL]--
END$$
DELIMITER ;
-- 然后F9执行就可以
>>> $_config = array('db_host' => 'localhost', 'db_user' => 'edu', 'db_pwd' => 'edu','db_name' => 'edu', 'db_lang' => 'utf8', 'db_prefix' => 'edu_', 'pconnect' => 0,'debug'=>1);
=> [
"db_host" => "localhost",
"db_user" => "edu",
"db_pwd" => "edu",
"db_name" => "edu",
"db_lang" => "utf8",
"db_prefix" => "edu_",
"pconnect" => 0,
"debug" => 1,
]
>>>
>>>
>>>
>>> $c = array('db_host' => 'localhost', 'db_user' => 'root', 'db_pwd' => 'xx','db_name' => 'pcdd2', 'db_lang' => 'utf8', 'db_prefix' => 'un_', 'pconnect' => 0,'debug'=>1)
=> [
"db_host" => "localhost",
"db_user" => "root",
"db_pwd" => "xx",
"db_name" => "xxx",
"db_lang" => "utf8",
"db_prefix" => "un_",
"pconnect" => 0,
"debug" => 1,
]
>>>
>>>
>>> array_merge($_config,$c)
=> [
"db_host" => "localhost",
"db_user" => "root",
"db_pwd" => "xx",
"db_name" => "xxx",
"db_lang" => "utf8",
"db_prefix" => "un_",
"pconnect" => 0,
"debug" => 1,
]
>>>
PATH=/software/mysql/bin:$PATH
export PATH
export PATH=/software/mysql/bin:$PATH
>>> $str = "This is some bold text.";
=> "This is some bold text."
>>> htmlspecialchars($str)
=> "This is some <b>bold</b> text."
>>> $str = "Who's John Adams?";
=> "Who's John Adams?"
>>> addslashes($str)
=> "Who's John Adams?"
LayBlog 强力驱动.
本站重建于2017年12月2日.
部分内容来自网络,如有问题,请联系站长处理.
友情链接:
珠海拖鞋仔博客 |
沉默是金