Re: Limit output of query field

From: Date: Sat, 05 Jul 2003 14:35:03 +0000
Subject: Re: Limit output of query field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154053@lists.php.net to get a copy of this message
Make it with your sql query, it will be faster: SELECT ..., IF(LENGTH(text)>50, CONCAT(SUBSTRING(text,0,50),'...'), text) as text fkeessen@planet.nl wrote:
Hi there, Hope you can help me with the following: I have a query and i'm showing the output: echo $row->text; That goes o.k. but the text is 400 characters long and I only one to show the first 50 characters and at the end showing ... dot's.. Help! Thank you very much! Frank


« previous php.general (#154053) next »