Mercurator Posted January 5, 2009 Share Posted January 5, 2009 Hello! I'm writing a "last topic" phpBB3 module for my page. I have a working query, but since I'm new at php, I'm having problems with the output. I get the blob/mediumtext from mysql, but I don't know how to limit the $POST_TEXT to, let's say 50 characters. Can anyone help me out? George Quote Link to comment Share on other sites More sharing options...
fenway Posted January 5, 2009 Share Posted January 5, 2009 You say output but then mention the POST hash... I'm confused. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted January 5, 2009 Share Posted January 5, 2009 I'm going to take a wild guess that this has absolutely nothing to do with mysql and you're just interested in displaying the first 50 characters with a "read-more" type link? Take a look at the substr function. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 5, 2009 Share Posted January 5, 2009 or the MySQL substring() function Quote Link to comment Share on other sites More sharing options...
fenway Posted January 5, 2009 Share Posted January 5, 2009 Or LEFT(). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.