Hor*_*ren 13
看一下MySQL字符串函数:
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
特别是这看起来很有用
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substring-index
UPDATE
这正是你要求的:
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX("/site/index?sid=18&sub=321333&tid=site.net&ukey=1234543254", 'sid=', -1), '&', 1) AS this_will_be_grouped
Run Code Online (Sandbox Code Playgroud)
并this_will_be_grouped在GROUP BY查询的子句中使用
| 归档时间: |
|
| 查看次数: |
13016 次 |
| 最近记录: |