????С??????????Щ????У????????????????????????????????????????????????????о??Щ????????????sql
????1????????????????????????ж????漰???Щ???? ????????????????
????SELECT COUNT(sign_id) FROM table WHERE DATE_FORMAT(sign_at?? ‘%Y-%m-%d’) = DATE_FORMAT(DATE(NOW())?? ‘%Y-%m-%d’) AND id =XX;
????????sql??????????????Щ?????;
????SELECT COUNT(id) FROM contacts_view WHERE created_at >= ( CURDATE() – INTERVAL 15 DAY )
????????sql????????????15????Щ?????;??????? 3?? 5?? 9??;
???????????
????2??SELECT * FROM ?? WHERE datediff(month??[dateadd]??getdate())=0
??????????μ??????;
????3?????????????????????????????????????棬???????????????????????????????????????????.
????SELECT user_id?? ( 6731 * acos( cos( radians($lat) ) * cos( radians( lat ) ) * cos( radians( lng ) – radians($lng) ) + sin( radians($lat) ) * sin( radians( lat ) ) ) ) AS distance FROM user WHERE user_id != ? AND status = 1 AND lng IS NOT NULL AND lat IS NOT NULL ORDER BY distance
????????????????????????????????????????????????????е??γ??.???????;
????4???????????php?? js???ж??????????????????.?????????????????????????????????????????????????sql??????????????????????????Ч????.sql????е????????????”REGEXP “?? ?????????sql?е?like.
???????磺
????SELECT name FROM user WHERE name REGEXP ‘galen’;
???????????????????
????????galen???????????????????like??????????????С????????????????????sql????????????Щ?????????????????