Set limit of charactures returned from a DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bam

    Set limit of charactures returned from a DB

    I am trying to search this, but maybe I am not searching for the right
    thing.

    I have sql DB, and I have code to retrieve the information I want.

    What I need is to be able to limit the number of charactures retrieved.
    I am writing a pm system, and I want to display the first 50 charactures of
    a post, then have the user click to read to get the rest of it.

    example....

    the post is abcdefghijklmno pqrstuvwxyz

    but for the abbreviation of the post, i want it toshow abcdefghijklm.. ....
    which would be 13

    the retrieve i have is pm_message =
    trim(pm1.fields .item("fieldnam e").value)

    how would I constrict the return on this??

    i would appreciate a solution, or a better way to search for it.
    thanks
    Bam


  • Jeff Dillon

    #2
    Re: Set limit of charactures returned from a DB

    I would return the whole string from the db, and handle this client side, so
    you don't need to make 2 trips to the server

    Jeff

    "Bam" <bam@gig-gamers.comwrote in message
    news:47ceeef7$0 $22793$4c368faf @roadrunner.com ...
    >I am trying to search this, but maybe I am not searching for the right
    >thing.
    >
    I have sql DB, and I have code to retrieve the information I want.
    >
    What I need is to be able to limit the number of charactures retrieved.
    I am writing a pm system, and I want to display the first 50 charactures
    of a post, then have the user click to read to get the rest of it.
    >
    example....
    >
    the post is abcdefghijklmno pqrstuvwxyz
    >
    but for the abbreviation of the post, i want it toshow
    abcdefghijklm.. .... which would be 13
    >
    the retrieve i have is pm_message =
    trim(pm1.fields .item("fieldnam e").value)
    >
    how would I constrict the return on this??
    >
    i would appreciate a solution, or a better way to search for it.
    thanks
    Bam
    >

    Comment

    • Bam

      #3
      Re: Set limit of charactures returned from a DB


      that's what i actually did.
      set 2 variables, one for the abrev, and one for the complete

      thanks again!!


      "Jeff Dillon" <jeffdillon@hot mailremove.comw rote in message
      news:OKwQvfvfIH A.5088@TK2MSFTN GP02.phx.gbl...
      >I would return the whole string from the db, and handle this client side,
      >so you don't need to make 2 trips to the server
      >
      Jeff
      >
      "Bam" <bam@gig-gamers.comwrote in message
      news:47ceeef7$0 $22793$4c368faf @roadrunner.com ...
      >>I am trying to search this, but maybe I am not searching for the right
      >>thing.
      >>
      >I have sql DB, and I have code to retrieve the information I want.
      >>
      >What I need is to be able to limit the number of charactures retrieved.
      >I am writing a pm system, and I want to display the first 50 charactures
      >of a post, then have the user click to read to get the rest of it.
      >>
      >example....
      >>
      >the post is abcdefghijklmno pqrstuvwxyz
      >>
      >but for the abbreviation of the post, i want it toshow
      >abcdefghijklm. ..... which would be 13
      >>
      >the retrieve i have is pm_message =
      >trim(pm1.field s.item("fieldna me").value)
      >>
      >how would I constrict the return on this??
      >>
      >i would appreciate a solution, or a better way to search for it.
      >thanks
      >Bam
      >>
      >
      >

      Comment

      Working...