RE: Some way/tool to do this with database scripts backups

2008-04-05 Thread Martijn van den Burg
Hi, if i have for example a simple table call person with 'id' and 'name' how columns i can do a backup and get some file (A.sql) with all the inserts statements here, all fine but how i can do this? Have a look at the 'mysqldump' command line utility. It goes something like

Incorrect results from sum

2008-04-05 Thread Jonathan Mangin
I'm getting incorrect results from a sum and wonder if anyone sees something obviously wrong. (Won't surprise me.) Leaving 'simple' out of the equation (or adding 'simple' values manually) gets me the correct number. $menu is a personalized table of meal/recipe ingredients. itemized is a list of

Re: Incorrect results from sum

2008-04-05 Thread Jake Peavy
On 4/5/08, Jonathan Mangin [EMAIL PROTECTED] wrote: I'm getting incorrect results from a sum and wonder if anyone sees something obviously wrong. (Won't surprise me.) Leaving 'simple' out of the equation (or adding 'simple' values manually) gets me the correct number. $menu is a

Re: Incorrect results from sum

2008-04-05 Thread Jonathan Mangin
- Original Message - From: Jake Peavy [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Saturday, April 05, 2008 11:59 AM Subject: Re: Incorrect results from sum On 4/5/08, Jonathan Mangin [EMAIL PROTECTED] wrote: I'm getting incorrect results

Re: Incorrect results from sum

2008-04-05 Thread Peter Brawley
Jonathan, Jake provided useful suggestions answered your question. For elaboration of Jake's tip, see the manual page for GROUP BY for how joins affect grouping. PB - Jonathan Mangin wrote: - Original Message - From: Jake Peavy [EMAIL PROTECTED] To: Jonathan Mangin [EMAIL

Re: Incorrect results from sum

2008-04-05 Thread Jonathan Mangin
Hi, Here's the basic query I'm trying. It's supposed to return the totals of each nutrient (carb, in this case) by date. The data totals 218.31, but I get 190.80. select itemized.day_date as day_date, round(sum(my_menu.carb * units) + simple.carb,2) from itemized inner join simple using (uid)

Re: Incorrect results from sum

2008-04-05 Thread Perrin Harkins
On Sat, Apr 5, 2008 at 9:28 PM, Jonathan Mangin [EMAIL PROTECTED] wrote: select itemized.day_date as day_date, round(sum(my_menu.carb * units) + simple.carb,2) from itemized inner join simple using (uid) inner join my_menu on itemized.personal_id = my_menu.id where itemized.uid = 'me' and