SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html list in mysql field

    have a text field with skills separated by commas (actually this is copied and pasted right out of a Quark document and looks like this)
    advancing their paddle stroke on front, back and side swimming 30 feet independently and 25 yards with an I.F.D. At this level rhythmic side breathing and breaststroke will be introduced. Students will learn to glide, swim underwater, do knee dives, jump from the side and swim back independently or with minimal assistance and continue learning safety skills.
    I want to be able to output the comma separated text as bullets so it would look like this:
    advancing their paddle stroke on front
    b ack and side swimming 30 feet independently and 25 yards with an I.F.D
    rhythmic side breathing and breaststroke will be introduced
    Students will learn to glide, swim underwater, do knee dives, jump from the side and swim back independently or with minimal assistance and continue learning safety skills

    I can achieve this if if manually go in and put
    * and
    elements in the mysql textfield but it seems that there should be another way to do this.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,330
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    it appears you want to split not only on commas, but on certain periods (i.e. not all periods, otherwise you'd split I.F.D. into three bullets) and you've somehow lost the words "At this level"

    you can use the mysql UPDATE statement with the REPLACE function, to replace a comma with, for example, the html <li> tag, but it would change every comma, and then you'd get separate list items for "glide, swim underwater, do knee dives, jump from the side and ..."

    see the difficulty? sounds like doing it manually might be the easiest
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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