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

From: Date: Thu, 04 Mar 2004 10:50:28 +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-33283@lists.php.net to get a copy of this message
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

« previous php.db (#33283) next »