Hi Brendan,

> i have a HUGE database (30+megs) which has just been converted
> from  microsoft access to mysql (yay!) ..

Indeed yay! ;-)

But eh, 30+ megs isn't huge these days, you have to go into gigabytes
for that ;-)
And yes, there are serious MySQL users out there that have
multi-gigabyte databases!
No problem for MySQL....


> the original designer had five separate fields for keywords
> ie keyword1, keyword2, keyword3,keyword4,keyword5
> I would like to create a new field called 'keywords' (very original i
> know) which has the value from each of these fields separated by a
comma.
> ie. keywords=' keyword1, keyword2, keyword3,keyword4,keyword5';

Ehm, what are you trying to do, exactly?
See, it might be better to create an extra table with two fields, one ID
reference (to the entries in the first table) and your keyword. Then,
for each keyword (unlimited number), you simple have an idref,keyword
entry in the keyword table!

SELECT can grab the two together easily
And it will be way faster too: depending on how you do your search of
the keywords, you may be able to do without a LIKE '%key%' statement. In
your 'keyword,keyword,...' solution, you'd be pretty much stuck with
that. It could be a plain indexed search!


> i need to loop through the entire database and do this for every row..
> i could write a php script to do this but it would probably cause a
cgi
> timeout .. so i would rather do it from the mysql command line.. (i am
> on win2k)

Well that's no problem! You can modify the timeout in a PHP script with
the set_time_limit() function.

You may also want to look at the INSERT ... SELECT .... style statement,
that could provide a very simple solution.


Regards,
Arjen.

--
MySQL Training Worldwide, http://www.mysql.com/training/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Arjen G. Lentz <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Technical Writer
/_/  /_/\_, /___/\___\_\___/   Brisbane, QLD Australia
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to