Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all...

i have written a query like:
SQL
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..
Posted
Updated 22-Feb-12 0:11am
v3
Comments
Nilesh Patil Kolhapur 22-Feb-12 3:03am    
Give table Data
tulasiram3975 22-Feb-12 4:04am    
Dear Patil Nilesh,
say for example the message column contains this text-->
don't read this text and wont waste your time
-------------
A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. These differ only in the maximum length of the values they can hold. The four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These correspond to the four BLOB types and have the same maximum lengths and storage requirements. See Section 10.5, “Data Type Storage Requirements”.

BLOB values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values. TEXT values are treated as nonbinary strings (character strings). They have a character set, and values are sorted and compared based on the collation of the character set.

If strict SQL mode is not enabled and you assign a value to a BLOB or TEXT column that exceeds the column's maximum length, the value is truncated to fit and a warning is generated. For truncation of nonspace characters, you can cause an error to occur (rather than a warning) and suppress insertion of the value by using strict SQL mode. See Section 5.1.6, “Server SQL Modes”.

Beginning with MySQL 5.0.60, truncation of excess trailing spaces from values to be inserted into TEXT columns always generates a warning, regardless of the SQL mode.

If a TEXT column is indexed, index entry comparisons are space-padded at the end. This means that, if the index requires unique values, duplicate-key errors will occur for values that differ only in the number of trailing spaces. For example, if a table contains 'a', an attempt to store 'a ' causes a duplicate-key error. This is not true for BLOB columns.

In most respects, you can regard a BLOB column as a VARBINARY column that can be as large as you like. Similarly, you can regard a TEXT column as a VARCHAR column. BLOB and TEXT differ from VARBINARY and VARCHAR in the following ways:
----------------------------------------------------------------
but

the query retrieve this much text:-

A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. These differ only in the maximum length of the values they can hold. The four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT. These correspond to the four BLOB types and have the same maximum lengths and storage requirements. See Section 10.5, “Data Type Storage Requirements”. BLOB values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values. TEXT values are treated as nonbinary strings (character strings). They have a character set, and values are sorted and compared based on the collation of the character set. If strict SQL mode is not enabled and you assign a value to a BLOB or TEXT column that exceeds the column's maximum length, the value is truncated to fit and a warning is generated. For truncation of non
-------------------------------------------------
"so here i need to get whole text(from starting to ending)

1 solution

small guess:
SQL
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)
 
Share this answer
 
Comments
tulasiram3975 22-Feb-12 12:20pm    
dear digimanus,
i appreciate you for giving reply at least
Messages is not a column name here its a reference for "( DISTINCT '',`fromfirstname`,':','',`message` SEPARATOR '<br />' )" this combination of columns and here my problem is it fetching data but characters are limited it is not getting whole text from columns...
for example i was stored a long size paragraph when i retrieving back to gridview it is not showing whole paragraph it shows upto some limited lines in paragraph..
i hope you understand my problem
thank you...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900