techker Posted September 1, 2009 Share Posted September 1, 2009 Hey guys!! i have a quick question.i have a database that holds clients info name..number..payment method.. i need to count how many clients payed by visa so the tables name is new_members the row is called mode i got up to here but it always shows 0 SELECT COUNT( `mode` ) AS TotalNumber, SUM( `mode` ) AS TotalPrice FROM `new_members` WHERE `mode`= CHEQUE <?php echo $row3['TotalPrice'] ?> [code] i used a query from another page in my script.. Quote Link to comment Share on other sites More sharing options...
ReKoNiZe Posted September 1, 2009 Share Posted September 1, 2009 SELECT COUNT(*) As TotalNumber FROM new_members WHERE mode="visa" That will list a TotalNumber of the times visa was used. Quote Link to comment Share on other sites More sharing options...
techker Posted September 1, 2009 Author Share Posted September 1, 2009 nice...i should of looked at select count...lol Quote Link to comment Share on other sites More sharing options...
techker Posted September 2, 2009 Author Share Posted September 2, 2009 is there a way to make it stay?cause the next day it disappears since it is only set to current day.. Quote Link to comment Share on other sites More sharing options...
techker Posted September 2, 2009 Author Share Posted September 2, 2009 anybody? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 7, 2009 Share Posted September 7, 2009 is there a way to make it stay?cause the next day it disappears since it is only set to current day.. What is set to the current day? Quote Link to comment Share on other sites More sharing options...
techker Posted September 7, 2009 Author Share Posted September 7, 2009 i figured out that the field was set to varchar not date.. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 8, 2009 Share Posted September 8, 2009 So, solved? Quote Link to comment Share on other sites More sharing options...
techker Posted September 8, 2009 Author Share Posted September 8, 2009 ya thx! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.