Re: Query help...
On 2/29/2012 1:15 PM, Don Wieland wrote: Little help... In my mySQL query editor, I am trying to return a value of 0 when there is no related rows from this query: (select if(count(ip.payment_amount) IS NOT NULL, count(ip.payment_amount) , 0) FROM tl_trans_pmt_items ip WHERE t.transaction_id = ip.inv_id GROUP BY ip.inv_id) as d, regardless of the combination I use, invalid relationships come back as NULL - need to return 0 so I can use it in a math formula. Probably simple - maybe ;-) Don I think you want the 'coalesce' function: Syntax: COALESCE(value,...) Returns the first non-NULL value in the list, or NULL if there are no non-NULL values. URL: http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html Examples: mysql> SELECT COALESCE(NULL,1); -> 1 Michael Heaney JCVI -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL Backup solution for non-technical user
On 5/10/2011 3:55 PM, Dotan Cohen wrote: Is there a simple browser-based MySQL backup solution for non-technical users. The server is running Red Hat Enterprise Linux. The main features needed are: 1) Automatic scheduled off-site backups (via SSH or FTP) 2) Backup multiple databases and all their tables 3) Single-table recovery via GUI (the user simply chooses which database and which table to recover) 4) FOSS-license a big plus, but other licenses considered I have ruled out cron/mysqldump for the GUI (browser-based) recovery requirement.I found phpMyBackupPro which looks like a possible solution, and I'd really appreciate other MySQL users' input on the topic. Check out Zmanda: http://zmanda.com/zrm-mysql-enterprise.html Michael Heaney JCVI -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org