Jump to content

Clean upTable


Go to solution Solved by Barand,

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

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

It currently adds the amounts column if i use SUM. Im wanting it to when it narow the date, only add the amounts ('vaule') shown. The third returned image shows its still addin all teh amounts instead of teh selected dates. The first returned image shows every entry for reference

Edited by rusking
Link to comment
https://forums.phpfreaks.com/topic/278184-clean-uptable/#findComment-1431063
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.