Jump to content

Clean upTable


rusking

Recommended Posts

SELECT TYPE,date , (Amount) FROM DEBITS where TYPE='Cell Phone' HAVING Date BETWEEN '1999-05-20 00:00:00' AND '2013-05-21 00:00:00'

Gives me :

post-99869-0-78669900-1368998082_thumb.png

 

Im trying to add all the 'Vaule' displayed. IF i SUM like this

SELECT TYPE,date , SUM(Amount) FROM DEBITS where TYPE='Cell Phone' HAVING Date BETWEEN '1999-05-20 00:00:00' AND '2013-05-21 00:00:00'

 I get:

post-99869-0-34091700-1368998093_thumb.png

 

 

 

 

This seems correct but if i chage the dates and sum:

SELECT TYPE,date , SUM(Amount) FROM DEBITS where TYPE='Cell Phone' HAVING Date BETWEEN '2012-05-20 00:00:00' AND '2013-05-21 00:00:00'

I return :

post-99869-0-34091700-1368998093_thumb.png

 

 

I am new to MySQLi and have been learning it the past 30 hours. Ultimately if i could add only the 'Vaule' of the proucted array i should be ok but i keep breaking it

Link to comment
https://forums.phpfreaks.com/topic/278184-clean-uptable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.