Web Analytics Made Easy -
StatCounter How would I loop through the text and get each word? - CodingForum

Announcement

Collapse
No announcement yet.

How would I loop through the text and get each word?

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

  • How would I loop through the text and get each word?

    Hi, I have text rows in my database.For each row I want to insert each word into a table.

    How would I loop through the text and get each word?


  • #2
    Originally posted by nikos101 View Post
    Hi, I have text rows in my database.For each row I want to insert each word into a table.

    How would I loop through the text and get each word?
    it's hard to do this using only mysql, as far as I know.
    probably you need to query the table, fetch the text then using a associative array to extract uniq words(with a server side scripting language like perl or php) and in the end to populate the table with what you get.
    I guess is not a problem to implement that, few lines only.

    best regards

    Comment


    • #3
      Originally posted by oesxyl View Post
      it's hard to do this using only mysql, as far as I know.
      Thanks

      Thats a shame, what about just using mssql

      Comment


      • #4
        Originally posted by nikos101 View Post
        Thanks

        Thats a shame, what about just using mssql
        yes shame, but why?
        I guess you already access mysql from a perl/php api so what's the problem?

        best regards

        Comment


        • #5
          well I can use ms sql at work

          Comment


          • #6
            Google "mysql cursors" or "sql cursors", it should give you what you want for mysql or Sequel Server.

            Good luck;
            -Brando
            Why using tables for eating is stupid!

            Comment

            Working...
            X