Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,007
    Thanks
    59
    Thanked 10 Times in 10 Posts

    Question 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
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote 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

  • #3
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,007
    Thanks
    59
    Thanked 10 Times in 10 Posts

    Question

    Quote 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


  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote 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

  • #5
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,007
    Thanks
    59
    Thanked 10 Times in 10 Posts
    well I can use ms sql at work


  • #6
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Google "mysql cursors" or "sql cursors", it should give you what you want for mysql or Sequel Server.

    Good luck;


  •  

    Posting Permissions

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