查询以获取表中列中显示的所有内容 [英] query to get all the content presented in columns from table
本文介绍了查询以获取表中列中显示的所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好...
我写了一个查询,如:
hi all...
i have written a query like:
SELECT group_concat( DISTINCT '',`fromfirstname`,':','',`message` SEPARATOR '<br />' ) as Message FROM `tblmessages` WHERE fromusername='10zwit17' OR tousername='10zwit17' GROUP BY `sessionname` ORDER BY `id` DESC
这里的问题是它正在获取有限的文本(即最多一些字符),但是在这里我需要在表的列中获取整个文本)任何人都可以帮我吗...
预先感谢..
here the problem is it is fetching limited text (i.e upto some characters) but here i need get whole text in the columns in table ) can any one help me please...
thanks in advance..
推荐答案
小猜想:
SELECT Message
FROM tblmessages
where Message in (select group_concat( DISTINCT '',`fromfirstname`,':','',`message` SEPARATOR '<br />' ) as Message FROM `tblmessages` WHERE fromusername='10zwit17' OR tousername='10zwit17' GROUP BY `sessionname` ORDER BY `id` DESC)
这篇关于查询以获取表中列中显示的所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文