2009-10
2009-8
2009-10+2
10021-8我想排成這樣,“—”前面的按字符由小到大排序,“—”後面的按數字由小到大排列
10021-8
2009-8
2009-10
2009-10+2
2009-8
2009-10+2
10021-8我想排成這樣,“—”前面的按字符由小到大排序,“—”後面的按數字由小到大排列
10021-8
2009-8
2009-10
2009-10+2
解决方案 »
- php+mysql多重数据模糊搜索,求救
- 求一段php代码,谢谢,
- 急求:Magento1.4的仓库插件、CRM插件、ERP插件
- 数组和mysql where怎么一起用
- PHP正则
- 有关Flex处理php返回数据的中文问题
- 启动Apache HTTP Server 2.2.6提示cannot load php4apache2.dll into server
- 关于PHP正则的问题
- 淘宝搜索栏的打字 提示相关同名的特效是怎么做的
- PHP网站出现500的错误,无法打开,求大神解答怎么回事?
- Fatal error: Call to undefined method JDocumentRAW::addCustomTag()
- 自动填写、自动提交
FROM (SELECT substring( fld1, 1, (
instr( fld1, '-' ) -1 )
) AS fld1, substring( fld1, (
instr( fld1, '-' ) +1 )
) AS fld2
FROM `table1`
)tb1
ORDER BY tb1.fld1 ASC , tb1.fld2 ASC 这个应该可以实现
instr( fld1, '-' ) -1 )
) AS fld1, substring( fld1, (
instr( fld1, '-' ) +1 )
) AS fld2
FROM `table1`
ORDER BY fld1 ASC , fld2 ASC外面那层select不要也可以
这样的话,数据量大应该也没问题吧
instr( fld1, '-' ) -1 )
) AS fld1, substring( fld1, (
instr( fld1, '-' ) +1 )
) AS fld2
FROM `table1`
ORDER BY fld1 ASC , fld2 ASC 牛
from table1
order by SUBSTRING_INDEX(col1,'-',1)+0,SUBSTRING_INDEX(col1,'-',-1)+0
select *
from table1
order by col1,SUBSTRING_INDEX(col1,'-',-1)