This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date('Ym', strtotime('-1 month', strtotime("first day of this month"))), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM `market_list` | |
WHERE `id` IN ('1', '2') | |
AND `status` = '1' | |
AND (`start_time` IS NULL | |
OR `start_time` <= '2017-07-31 17:05:57') | |
AND (`end_time` IS NULL | |
OR `end_time` >= '2017-07-31 17:05:57') | |
ORDER BY `priority` DESC | |
LIMIT 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SELECT LOCATE('bar', 'foobarbar'); | |
+---------------------------------------------------------+ | |
| LOCATE('bar', 'foobarbar') | | |
+---------------------------------------------------------+ | |
| 4 | | |
+---------------------------------------------------------+ | |
1 row in set (0.00 sec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 先按点赞数据排序,再按评论时间排序 | |
$likeCounts = array(); | |
$reviewTimes = array(); | |
foreach ($commentList as $item) { | |
$likeCounts[] = $item['likeCount']; | |
$reviewTimes[] = $item['reviewTime']; | |
} | |
array_multisort($likeCounts, SORT_DESC, $reviewTimes, SORT_DESC, $commentList); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mobileRE = /^(((13[0-9]{1})|(14[57]{1})|(15[0-9]{1})|(17[678]{1})|(18[0-9]{1}))+\d{8})$/; | |
var passwordRE = /^[A-Za-z0-9]{6,20}$/; | |
var BASE_PATH = '${basePath}'; | |
var j_captchaUrl = '${basePath}/jcaptcha'; // 获取验证码的后端地址 | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
mobile: '', | |
j_captcha: '', |