Re: MySQL select a field's first X bytes

From: Date: Tue, 17 Dec 2002 03:22:19 +0000
Subject: Re: MySQL select a field's first X bytes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128503@lists.php.net to get a copy of this message
Thanks a lot! I'm just blind! "Quentin Bennett" <Quentin.Bennett@infinity.co.nz> wrote in message news:5BD3984B6EDBCB4992B664CBC216E10476E00B@aklexchange.solutions.infinity.c o.nz... What's wrong with select left(myfield, 500) from mytable; ? Quentin -----Original Message----- From: Micah Bushouse [mailto:mbushouse@hotmail.com] Sent: Tuesday, 17 December 2002 3:22 p.m. To: php-general@lists.php.net Subject: [PHP] MySQL select a field's first X bytes Is there a way in MySQL to select a fields first X bytes? I have a field of type text. I would like to print the first 500 or so bytes of its contents as a summary of the entire field, then having the user click "read more..." or something of that sort for the whole document. I read up on select in the MySQL manual and didn't see much, does anyone out there know of such a feature? Should I just take the whole field into php and do it that way? thanks, Micah Bushouse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated.

« previous php.general (#128503) next »