Jump to content

Help with extraction


timmah1

Recommended Posts

I have a question on limiting content from the database.

 

It I have a database for blogs, and the only tables are

id

headline

blog

 

If the blog table has 500 words in it, how do I make the blog content limited to say only 50 words?

 

I want to list the blog headline and just a little bit of the content, and then have just a little bit of the blog with a read more... link.

 

How do I limit the blog?

 

thank you in advance

Link to comment
Share on other sites

There is no way to specify the amount of characters to return from a field; however, you can manipulate the maximum amount of data that is allowed to be transfered. In doing so, you can limit the number of words returned. Like mgallforever stated, though, it is going to be a lot easier to let php handle it.

 

Here is info on max_allowed_packet:

http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.