Question regards mysqldump and replication

2009-04-30 Thread Dominik Klein
Hi. I have a question regarding mysql replication and mysqldump. I have a master (A). All my clients insert/update/delete only to this master. Then I have a Slave (B). This slave only replicates the master. There are no other processes changing/inserting data into the Slave. The slave also logs

Totalling Counts done in Subqueries

2009-04-30 Thread Nigel Peck
Hi all, I'm hoping someone can help me with this please. Is there a way to total counts done in subqueries? So I want to do: -=-=-=-=-=-=-= SELECT `Notes`.`note_id`, `Notes`.`last_updated_datetime`, `Notes`.`event_date`, `Notes`.`subject`, `Notes`.`summary`, `Notes`.`content`, (SELECT

Re: Totalling Counts done in Subqueries

2009-04-30 Thread Peter Brawley
Is there a way to total counts done in subqueries? Select expression aliases can't be referenced at the same level. You have to create another outer level ... SELECT note_id, last_updated_datetime,event_date,subject,summary,content, linked_issues_count,linked_people_count,

Re: Totalling Counts done in Subqueries

2009-04-30 Thread nigel wood
Peter Brawley wrote: Is there a way to total counts done in subqueries? Select expression aliases can't be referenced at the same level. You have to create another outer level ... alternatively use variables: mysql select @first := 1 as value1, @second := 2 as value2, @fir...@second as

Re: Totalling Counts done in Subqueries

2009-04-30 Thread Nigel Peck
Thanks Nigel and Peter, I went for Nigel's solution below. Both very useful, learnt a lot, thank you. Cheers, Nigel nigel wood wrote: Is there a way to total counts done in subqueries? Never done this but my educated guess is: SELECT `Notes`.`note_id`, `Notes`.`last_updated_datetime`,

Is there a MySQL 5.4 Speed advantage for MyISAM tables?

2009-04-30 Thread mos
I see MySQL 5.4 is out. http://www.mysql.com/news-and-events/generate-article.php?id=1602 Sun claims there are speed improvements for Innodb and ClusterDb tables, but is there any reason to upgrade if I'm only using MyISAM tables? Also I didn't see a Windows binary download. Does this mean I

Where the hell did 5.4 come from?

2009-04-30 Thread Daevid Vincent
Have I been in a coma or something? WTF happened to 5.2 and 5.3? Hell, we're still on 5.0.51 and 5.1 just came out a month or two ago right? -Original Message- From: mos [mailto:mo...@fastmail.fm] Sent: Thursday, April 30, 2009 7:40 AM To: mysql@lists.mysql.com Subject: Is there a

SELECT of records that have a matching record in a many to many table

2009-04-30 Thread Nigel Peck
Can someone please help me with this one? I'm trying to SELECT from a table only those records that have a record, matching a search term, in a table related by a many to many relationship. The many to many relationship is in a mapping/junction table. Here's an example of what I have so

Re: Where the hell did 5.4 come from?

2009-04-30 Thread Andy Shellam
My thoughts exactly! This article might help: http://dev.mysql.com/tech-resources/articles/mysql-54.html It worries me though that 5.1 went through a large number of alpha releases, then a set of beta releases before the GA release came out. It looks like they've thrown 5.4 straight out

RE: Where the hell did 5.4 come from?

2009-04-30 Thread Gary Smith
Oracle owns the mess now. I assume the next release will be 5.11, followed by 5.11i, and then finally dropping of the 5 to be in line with how they manager their os, leave it to just be 11i. To ensure it is smooth they will change the license and add $5k in suport costs.

Re: Now() : SQL syntax error. But why?

2009-04-30 Thread Antonio PHP
Thanks, Scott. I thought I couldn't have missed ','(comma) before. But today somehow it works... ;; I wasted hours figuring this out, but you saved me! Maybe I'm still a complete newbie! Thanks, again. Have a great day. :) On Thu, Apr 30, 2009 at 12:52 PM, Scott Haneda talkli...@newgeo.com

Re: Now() : SQL syntax error. But why?

2009-04-30 Thread Scott Haneda
Always echo out your SQL string, it will make it a lot more obvious. You want to see the result. I php concatenated string can be confusing at times. Also, you are not escaping your data, so if you had a word of 'stops, here' that would break it as well. So in your case, you very well