Announcement

Collapse
No announcement yet.

Limiting number of characters displayed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WildWayz
    replied
    SELECT LEFT(*, 200) FROM $table_name WHERE ....

    think that is what u would use

    --James

    Leave a comment:


  • Tim Mousel
    replied
    Hi,

    Thanks for the input. I've got a fairly large select statement already which starts as SELECT * FROM $table_name WHERE....

    Should I just make a new select statement or is there a way to incorporate your select statement and combine it with the one I already have.

    Thanks,

    Tim

    Leave a comment:


  • Theiggsta
    replied
    Use LEFT...its a cool little thingie that goes X number of character from the left side of a string...

    Now the syntax is simple:
    LEFT(string,length)

    Here is an example:

    SELECT LEFT(text,500) FROM post WHERE postid = '100'

    this will return the first 500 characters of the text in post number 100

    that should be simple enough to explain...hope that helps

    Leave a comment:


  • Tim Mousel
    started a topic Limiting number of characters displayed?

    Limiting number of characters displayed?

    Hello,

    In my search results, the profile of a user will be displayed from a mysql database. How can I display only the first 500 characters?

    Thanks,

    Tim
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X