...

View Full Version : How would I loop through the text and get each word?



nikos101
04-14-2009, 06:07 PM
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?

oesxyl
04-14-2009, 06:15 PM
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

nikos101
04-14-2009, 06:26 PM
it's hard to do this using only mysql, as far as I know. :)

Thanks

Thats a shame, what about just using mssql

oesxyl
04-14-2009, 06:43 PM
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

nikos101
04-15-2009, 09:37 AM
well I can use ms sql at work

Brandoe85
04-15-2009, 05:15 PM
Google "mysql cursors" or "sql cursors", it should give you what you want for mysql or Sequel Server.

Good luck;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum