Re: Limit chars from select
| From: | John Meyer | Date: | Mon, 30 Jan 2006 01:51:06 +0000 |
| Subject: | Re: Limit chars from select | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41152@lists.php.net to get a copy of this message | ||
Gavin Amm wrote:
> How do I limit the characters a Select statement returns?
> In Seudo code:
> SELECT * FROM myTable LIMITCHARS 30;
>
> I'm using MySQL.
>
> Thanks.
>
Do you want to limit the characters from an individual field? If so, then
SELECT SUBSTRING(FIELD1 FROM 1 FOR 30) FROM myTable;