Re: only showing partial info of a field in mysql...
| From: | Tristan dot Pretty at risk dot sungard dot com | Date: | Thu, 04 Mar 2004 11:19:46 +0000 |
| Subject: | Re: only showing partial info of a field in mysql... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33286@lists.php.net to get a copy of this message | ||
Perfect!
Cheers...!
Richard Davey <rich@launchcode.co.uk>
04/03/2004 10:50
Please respond to
Richard Davey <rich@launchcode.co.uk>
To
php-db@lists.php.net
cc
Subject
Re: [PHP-DB] only showing partial info of a field in mysql...
Hello Tristan,
Thursday, March 4, 2004, 10:27:34 AM, you wrote:
TPrsc> You know in PHPmyADMIN...
TPrsc> if you hav a large field, and hit browse, you only see some fo the
text...
TPrsc> is this a PHP thing, or a MySQL thing... more improtantly, how can
I do
TPrsc> that??
I don't know how PHPmyAdmin does it, but you can do this in SQL
directly without having to do it in PHP. Look at the SQL functions:
LEFT(), MID(), RIGHT() and SUBSTRING().
I.e.
SELECT LEFT(longfield, 100) FROM table
This will bring back the first 100 characters from the longfield
column (assuming it has 100 characters in it).
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
*********************************************************************
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***********************************************************************