Re: Is there a way ?

2009-08-17 Thread Martijn Tonies

Hello Miles,

I'm a little rusty in my SQL statements, and I'm not all that certain  
that this can be done.


IF I have a field with the contents like:

http://beta.somedomain.com/url/url/url=2;

where 2 is the record ID value.  And I need to change the contents of  


That is rather unfortunate ... better change the design while you still
can. Just add a column with a unique ID.

In general, EVERY tables should have a primary key in order to identify
each record.


that field to read:

http://www.somedomain.com/url/url/url=2;

How would I accomplish this with a native SQL statement ?

I was thinking that I'd just export the contents of the table, and do  
a text manipulation against the field, only to realize that the record  
id value is embedded in the link of the field.  Which means that I  
can't change the record id value at all.  Or turn off the auto  
increment of the keyfield because it will invalidate the records when  
its turned back on


Any suggestions as to how I might clean this up 


See above, add a column, create a unique ID for it.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Fulltext query expansion query

2009-08-17 Thread Mark Goodge

Hi,

I'm currently working on a project which uses fuulltext searching. The 
with query expansion feature is useful, but I was wondering if there's 
any way to obtain the list of terms that the expanded query uses (other 
than those originally input, of course). Is that possible, and, if so, how?


Thanks

Mark
--
Stuff: http://www.good-stuff.co.uk
Blog: http://mark.goodge.co.uk

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Renaming a Database

2009-08-17 Thread Matt Neimeyer
I know the best way to rename a database is to use mysqldump,
extract the database and then reload to the new database. (At least
based on what I can find in the 12.1.32. RENAME DATABASE Syntax
section of the documentation)

That said... Is there anything wrong (dangerous, disasterous, etc)
with stopping the MySQL service and renaming the folder in the MySQL
data folder? By my logic (if I'm right) this should preserve any
permissions on the folder and since the service is stopped it should
simply find the new instance.

I know in the past I've used a similar method with single tables (stop
service, create a folder, drop in backups of tables, start service
muck with them) and I've had no problems... but I'm hoping wiser minds
will confirm I'll be okay OR that I shouldn't even try.

All in all, I'm trying to find a way to minimize OUR development time
as well as minimizing down time for the client. This would be a one
time thing to bring the database name in line with the new product's
newly picked conventions. (After we deployed four customers)

If it matters two of the installations are on OSX running a stock
MySQL 4.x installation and two are on Windows and I'm not certain the
version without checking.

Thanks!

Matt

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Renaming a Database

2009-08-17 Thread Paul DuBois


On Aug 17, 2009, at 4:22 PM, Matt Neimeyer wrote:


I know the best way to rename a database is to use mysqldump,
extract the database and then reload to the new database. (At least
based on what I can find in the 12.1.32. RENAME DATABASE Syntax
section of the documentation)

That said... Is there anything wrong (dangerous, disasterous, etc)
with stopping the MySQL service and renaming the folder in the MySQL
data folder? By my logic (if I'm right) this should preserve any
permissions on the folder and since the service is stopped it should
simply find the new instance.



If you have InnoDB tables, there will be a problem. InnoDB maintains  
the database name in the shared tablespace, and it will no longer be  
able to find those tables.


--
Paul DuBois
Sun Microsystems / MySQL Documentation Team
Madison, Wisconsin, USA
www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org