Re: Limit chars from select
| From: | John Meyer | Date: | Mon, 30 Jan 2006 03:06:58 +0000 |
| Subject: | Re: Limit chars from select | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41155@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gavin Amm wrote:
> I'd like to avoid having to manually add all of the cols to the select
> statement if possible, so if there's a universal command I can put in
> that'd be best.
In that case, what I would do is just do your SELECT statement, sans the
SUBSTRING() function, and then use PHP substr() to manually display the
first 30 characters.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFD3YLSj60GAoLuoDkRAlseAKD76nKk/heRkTqI3HPZFcgeuBkpbQCffTBE
q6HiS8z3GdaghKFHcJOL284=
=MA7K
-----END PGP SIGNATURE-----