php中关于sql数据库数据的问题
问题:我查询一个表比如xinxi里面的其中有字段为name,id
selectnamefromxinxiwhereid="变量"
如果查出来的name的长度的字符的值大于3比如为"aaaaaaaaaaaaaaa"我想显示为"aaa...";
怎么实现望大家帮忙.......
--
如果是SQL语句则为:
SQL code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->select name = case when len(name) > 3 then left(name,3) else name end from xinxi where id='变量'
页:
[1]