Re: Characters counting
| From: | Johannes Janson | Date: | Wed, 18 Apr 2001 19:44:59 +0000 |
| Subject: | Re: Characters counting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49251@lists.php.net to get a copy of this message | ||
Hi,
to get the first 150 chars of a mysql filed do this:
SELECT LEFT(YourField, '150') FROM YourTable WHERE YourCondition=true;
This does it in MySQL and for PHP follow the mentioned substr-method.
cheers
Johannes
""Jorn van Eck"" <Jorn.van.Eck@iie.nl> schrieb im Newsbeitrag
news:9bkpd8$r77$1@toye.p.sourceforge.net...
> Hi there,
>
> Does someone know how to display for example150 characters from a $ set by
> MySQL?
> --
> Jorn van Eck
> Student Information Engineering
> Almere
> Tel: +31 614430902
> E-mail: Jorn.van.Eck@iie.nl
> Website: http://www.iie.nl/~eck13
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>