In the last episode (Jul 09), Marcel Grandemange said:
> Create Trigger hostchange
> BEFORE UPDATE ON host
> FOR EACH ROW
> BEGIN
> IF NEW.status != OLD.status THEN
> use smsgw;
> insert into outbox (number, insertdate, text, phone, dreport) VALUES
> ('0836075144', '', 'HostDown', '1', '1')");
> EN
On 07/08/2009 06:11 PM, Gary Smith wrote:
Create a view or sub select, denormalizing the data and then group it.
select month, sum(login) as num_logins, sum(download) as num_downloads
from
(
select
monthname(s.created) as month_name
, if(ifnull(s.id, 0)> 0, 1, 0) as login
, if(ifnull(d.id, 0)>
Good Day once again.
Im needing assistance again with triggers!
Create Trigger hostchange
BEFORE UPDATE ON host
FOR EACH ROW
BEGIN
IF NEW.status != OLD.status THEN
use smsgw;
insert into outbox (number, insertdate, text, phone, dreport) VALUES
('0836075144', '', 'HostDown', '1', '1
Something like:
SET @version = "6.0";
SELECT CASE direction WHEN '>' THEN IF( @version > version, 'Y', 'N') WHEN '<'
THEN IF (@version < version, 'Y','N) ... END AS operation FROM test;
-Original Message-
From: Matt Neimeyer [mailto:m...@neimeyer.org]
Sent: Wednesday, July 08, 2009 2:45
Create a view or sub select, denormalizing the data and then group it.
select month, sum(login) as num_logins, sum(download) as num_downloads
from
(
select
monthname(s.created) as month_name
, if(ifnull(s.id, 0) > 0, 1, 0) as login
, if(ifnull(d.id, 0) > 0, 1, 0) as download
from sessions s left
I want to store the product version that an article applies to and a
comparison operator in my news system. But I can't wrap my head around
the where clause...
Here's what I've tried...
CREATE TABLE test (version char(10), direction char(2));
select concat("6.0",direction,version) as operation f
On 8 Jul 2009, at 22:26, Aaron Blew wrote:
The simplest method may be to set them up in a multi-master
configuration,
similar to what's documented here:
http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html
This way you won't have to worry about switching between two m
The simplest method may be to set them up in a multi-master configuration,
similar to what's documented here:
http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html
This way you won't have to worry about switching between two masters in a
failover scenario since they're both
On Jul 8, 2009, at 12:49 PM, Daevid Vincent wrote:
I know it comes a little too late, but as a preventive measure going
forward, I offer up my daily crontab backup script:
http://www.daevid.com/content/examples/daily_backup.php
FYI, this link does not work in Safari.
--
Scott * If you contac
On Jul 8, 2009, at 12:49 PM, Daevid Vincent wrote:
Ouch.
I know it comes a little too late, but as a preventive measure going
forward, I offer up my daily crontab backup script:
http://www.daevid.com/content/examples/daily_backup.php
They move a lot of data, so scheduled dumps were not real
I have successfully set up a replication master/slave scenario with my MySQL
5.0.51a
Now in the event of a fail over to the slave (an identical appliance), I want
the old master to become the slave for an eventual switch back the other way.
Would it really take the same process to keep the old ma
On 07/08/2009 03:33 PM, Gary Smith wrote:
Off the top of my head, try this.
SELECT
MONTHNAME(s.created) AS month,
sum(if(ifnull(s.id,0)> 0, 1, 0)) AS num_logins,
sim(if(ifnull(d.id, 0)> 0, 1, 0)) AS num_downloads
FROM sessions AS s LEFT JOIN downloads AS d
ON d.session_id = s.id GROUP BY month
> -Original Message-
> From: Scott Haneda [mailto:talkli...@newgeo.com]
> Sent: Wednesday, July 08, 2009 9:50 AM
> To: mysql@lists.mysql.com
> Subject: Client deleted database, semi high priority master
> slave question
>
> A client deleted their database and did not have a slave in
Off the top of my head, try this.
SELECT
MONTHNAME(s.created) AS month,
sum(if(ifnull(s.id,0) > 0, 1, 0)) AS num_logins,
sim(if(ifnull(d.id, 0)> 0, 1, 0)) AS num_downloads
FROM sessions AS s LEFT JOIN downloads AS d
ON d.session_id = s.id GROUP BY month
I'm trying to get a count for columns in 2 tables at once. I have
sessions and downloads tables and would like to get some basic stats.
mysql> describe sessions;
+-+--+--+-+-++
| Field | Type | Null | Key | Default | Extra
Carlos Williams wrote:
> On Wed, Jul 8, 2009 at 12:21 PM, John Meyer wrote:
>> Do we really need to bash OS's for MySQL. Rather than questioning what
>> OS is best for MySQL we should ask how we can optimize MySQL for each OS.
>
> Did I mis-read an email or can someone please explain to me how an
Hope the client learned the lesson about backups. it's a hard one to learn
sometimes.
If the binary logs on the slave were enabled when the table was populated
it should be possible to restore the table from the binary logs. If not,
and logging was turned on after the table was populated than you
A client deleted their database and did not have a slave in place for
backup. No scheduled dumps either.
However, I have set up a slave to the master for one table. These
tables hold DNS data for database driven DNS server features.
The master table is empty, the slave rightly saw the delet
There are merits to most of the common operating systems. In some ways
each of them perform better at various functions. The question becomes
which are you most comfortable and familiar with? That way you can work
most effectively with the operating system to fulfill the potential of
your databases
Ken Menzel wrote:
> Dan Nelson wrote:
>> In the last episode (Jul 06), Blog Tieng Viet said:
>>> I have been using MySQL on FreeBSD for 3 years and encounterd a lot of
>>> problems related to thread management. And 1 year ago, I found that my
>>> FreeBSD box does not go well with any MySQL revisio
Dan Nelson wrote:
In the last episode (Jul 06), Blog Tieng Viet said:
I have been using MySQL on FreeBSD for 3 years and encounterd a lot of
problems related to thread management. And 1 year ago, I found that my
FreeBSD box does not go well with any MySQL revision after 5.1.17-beta,
because the
active row itself, and you must change its values by SETting
>>NEW.fieldname:
>>IF NEW.NASPortID = 21 THEN
>> SET NEW.AcctInputOctets=(0 - NEW.AcctInputOctets);
>> SET NEW.AcctOutputOctets=(0 - NEW.AcctOutputOctets):
>>END IF;
>>--
>> Dan Nelson
>> dnel
22 matches
Mail list logo