Welcome to the IMTalk - Internet Marketing & SEO Forum.
  • Login:
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Hajoless is offline Banned Hajoless is on a distinguished road
    Join Date
    Apr 2011
    Posts
    117
    Thanks Given
    0
    Thanked 3 Times in 2 Posts

    Setting max length of a string returned from database

    Is there a way to call only so many characters/words from the database.

    Take for example a news database, the main news page has clickable headlines and below the start of the news item.

  2. #2
    adbox is offline IM & SEO Whisperer adbox is on a distinguished road
    Join Date
    Nov 2011
    Posts
    41
    Thanks Given
    1
    Thanked 8 Times in 7 Posts
    Do you mean to make an excerpt out of the full content? We could use php substr() function to trim the length of the full content.

  3. #3
    windfinder is offline IM & SEO Whisperer windfinder is on a distinguished road
    Join Date
    Nov 2010
    Location
    Upplands Väsby Sweden
    Posts
    42
    Thanks Given
    9
    Thanked 12 Times in 10 Posts
    or use the LEFT() function in MySql so that you don't have to shuffle that data out of the database at all.


 

Similar Threads

  1. Setting up a affliate-web, day by day
    By Nenivraj in forum Affiliate, CPC, CPA Programs
    Replies: 5
    Last Post: 10-21-2010, 06:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts