RE: [PHP-DB] Limit return Size
Try: $sql = SELECT LEFT(columnName,255) FROM tableName; Using that syntax should return the first 255 characters from the selected column, reading LEFT to right. I tested it in the command line and it worked just fine. Hope that helps. Rich -Original Message- From: Marie Osypian [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 3:06 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Limit return Size I would like to know how I limit my answer from a mysql database query to display only a limited size? Is this done in the query or the php? i.e. Our Performance Results area includes First Quarter 2003 investment returns for virtually every 529 savings programs. See how your 529 plan performed... This question is alot longer but it was stopped and ... added when it reached the desired size. Thanks MAO -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Limit return Size
Or $sql = SELECT concat(LEFT(columnName,255),...) FROM tableName; Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 Pay It Forward mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 2:46 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Limit return Size Try: $sql = SELECT LEFT(columnName,255) FROM tableName; Using that syntax should return the first 255 characters from the selected column, reading LEFT to right. I tested it in the command line and it worked just fine. Hope that helps. Rich -Original Message- From: Marie Osypian [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 3:06 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Limit return Size I would like to know how I limit my answer from a mysql database query to display only a limited size? Is this done in the query or the php? i.e. Our Performance Results area includes First Quarter 2003 investment returns for virtually every 529 savings programs. See how your 529 plan performed... This question is alot longer but it was stopped and ... added when it reached the desired size. Thanks MAO -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Limit return Size
I would like to know how I limit my answer from a mysql database query to display only a limited size? Is this done in the query or the php? i.e. Our Performance Results area includes First Quarter 2003 investment returns for virtually every 529 savings programs. See how your 529 plan performed... This question is alot longer but it was stopped and ... added when it reached the desired size. Here is a great thread on Devshed that discusses various PHP and MySQL methods to accomplish this: http://forums.devshed.com/showthread.php?s=threadid=23711perpage=15highlight=limit%20text%20from%20databasepagenumber=1 Enjoy. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php