RE: [PHP-DB] Limit return Size
| From: | Hutchins, Richard | Date: | Fri, 20 Jun 2003 19:46:08 +0000 |
| Subject: | RE: [PHP-DB] Limit return Size | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28772@lists.php.net to get a copy of this message | ||
Try:
$sql = "SELECT LEFT(columnName,255) FROM tableName";
Using that syntax should return the first 255 characters from the selected
column, reading LEFT to right. I tested it in the command line and it worked
just fine.
Hope that helps.
Rich
> -----Original Message-----
> From: Marie Osypian [mailto:mosypian@savingforcollege.com]
> Sent: Friday, June 20, 2003 3:06 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Limit return Size
>
>
> I would like to know how I limit my answer from a mysql
> database query to
> display only a limited size? Is this done in the query or the php?
>
> i.e. Our Performance Results area includes First Quarter
> 2003 investment
> returns for virtually every 529 savings programs. See how
> your 529 plan
> performed...
>
> This question is alot longer but it was stopped and ... added when it
> reached the desired size.
>
> Thanks
>
> MAO
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>