icuucme Posted April 25, 2008 Share Posted April 25, 2008 I have a database that i need to get the total for a certain column but only where field 1 is a certain value..let's say SELECT field1, field2, SUM(field3) WHERE field1='30' so i basically just want the sum of field 3 wherever field 1 is a certain value. I get an error when i do this, how can i work around this? Link to comment https://forums.phpfreaks.com/topic/102945-solved-using-where-with-sum/ Share on other sites More sharing options...
icuucme Posted April 25, 2008 Author Share Posted April 25, 2008 nevermind...shoulda searched first :S http://www.phpfreaks.com/forums/index.php/topic,179091.0.html Link to comment https://forums.phpfreaks.com/topic/102945-solved-using-where-with-sum/#findComment-527416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.