Re: Updating One Table With the Sum() of a Grouping From Another...

2006-11-22 Thread John Kopanas
Ahhh... I did the following: UPDATE companies c SET total_annual_service_charge = (SELECT SUM(annual_service_charge) FROM purchased_services ps WHERE ps.company_id = c.id); What think you? :-) On 11/22/06, John Kopanas <[EMAIL PROTECTED]> wrote: I have two tables: companies, purchased_services

Updating One Table With the Sum() of a Grouping From Another...

2006-11-22 Thread John Kopanas
I have two tables: companies, purchased_services... for each company in the companies table I want to sum up the annual_service_charge for each row that is associated with teh company in purchased_services. I have the following query: SELECT company_id, SUM(annual_service_charge) FROM purchased_

RE: Copy some datasets including the foreign key constraints

2006-11-22 Thread Jerry Schwartz
Do you know what your query looks like after variable substitution? That always helps me a lot. If you can't dump it to the screen because it breaks too much of your system, look into syslog(). That's what I use when debugging the heart of our online system, and it has helped me find missing single

Re: Problem with upgrade

2006-11-22 Thread Daniel da Veiga
On 11/22/06, Tom Ray [Lists] <[EMAIL PROTECTED]> wrote: I upgraded a server from 4.0 to 4.1 and then to 5.0 but I've been running into a problem. When I was running 4.0 the passwords with the password('password') command where being created like this: 2a287c002f9773dc now after I upgraded to 4.1

Problem with upgrade

2006-11-22 Thread Tom Ray [Lists]
I upgraded a server from 4.0 to 4.1 and then to 5.0 but I've been running into a problem. When I was running 4.0 the passwords with the password('password') command where being created like this: 2a287c002f9773dc now after I upgraded to 4.1 when I add a new user the passwords end up being like

Re: shutdown database but not mysqld

2006-11-22 Thread Philip Mather
Kieran, Just make a backup of the database to a file using mysqldump and then drop the database. If you need to recreate it again in the future, you can use the mysqldump backup file. Oh indeed, but if you got a "x"GB database that's not exactly going to be quick. I'm thinking of instead of sl

Copy some datasets including the foreign key constraints

2006-11-22 Thread Eidner, Fabian
Hello list, I'm pretty new here. But i already got an problem. I'm working a while with mysql currently i'm trying to duplicate some entries in my tables. The problem is, i'm using foreign key constraints between those tables and i also would like to duplicate the childs. So i got one big parent,

Re: shutdown database but not mysqld

2006-11-22 Thread Kieran Kelleher
Just make a backup of the database to a file using mysqldump and then drop the database. If you need to recreate it again in the future, you can use the mysqldump backup file. On Nov 21, 2006, at 9:28 PM, Alfred Mak wrote: Can I shutdown one of the databases in MySQL but not the whole mysq

Re: SSL Connections Feature?

2006-11-22 Thread Kieran Kelleher
Ah well, got it done on my own. This might help someone else trying to do this: http://homepage.mac.com/kelleherk/iblog/C711669388/E20061121141451/ index.html On Nov 21, 2006, at 11:41 AM, Kieran Kelleher wrote: We have been doing onsite replication for a few years and now we want to enabl

Re: shutdown database but not mysqld

2006-11-22 Thread Philip Mather
Dan, In the last episode (Nov 22), Alfred Mak said: Can I shutdown one of the databases in MySQL but not the whole mysqld process (i.e. keeping the other databases still running) ? "shutdown" would be the wrong word then :) How about revoking permissions (either at the mysql or the fi