MySQL Forums
Forum List  »  General

Selecting field as TEXT instead of VARCHAR in a view table
Posted by: Gijs Kattenberg
Date: June 07, 2010 06:54AM

Hi,

I'm having a problem with a view table that has the following line in the SQL:

GROUP_CONCAT(DISTINCT CAST(if(`users_groups`.`status` = 'logged in', CONCAT('<img src="/VID/images/status1.gif"><span title="', Gebruikers.naam, '">', extensions.extension, '</span>'), CONCAT('<img src="/VID/images/status2.gif"><span title="', Gebruikers.naam, '">', extensions.extension, '</span>')) AS CHAR) SEPARATOR ', ') as extensions

I'm adding HTML in the query (I don't want to do this with PHP) and because of the GROUP_CONCAT, the returnvalue can larger than a VARCHAR can handle, this will cause the last characters to fall off. Because of this I'd like the 'extensions' field to be of type TEXT, but I have no clue on how to do this. Is it even possible?

Cheers,
Gijs

Options: ReplyQuote


Subject
Written By
Posted
Selecting field as TEXT instead of VARCHAR in a view table
June 07, 2010 06:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.