Re: only showing partial info of a field in mysql...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perfect!

Cheers...!





Richard Davey <rich@xxxxxxxxxxxxxxxx> 
04/03/2004 10:50
Please respond to
Richard Davey <rich@xxxxxxxxxxxxxxxx>


To
php-db@xxxxxxxxxxxxx
cc

Subject
Re:  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.
***********************************************************************

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux