divinequran Posted February 19, 2009 Share Posted February 19, 2009 Hi, I have selected mysql database table values as following client amount month year joe $50 January 2005 nick $52 Feburary 2005 rubble $49 march 2005 nick $52 January 2005 nick $52 March 2005 rubble $42 Feburary 2005 joe $30 January 2006 nick $32 Feburary 2006 rubble $39 march 2006 som $39 April 2006 joe $25 January 2006 nick $22 Feburary 2006 rubble $19 march 2006 som $19 April 2006 joe $52 Feburary 2005 joe $52 march 2005 rubble $40 January 2005 I want the above values to print as 2005 Joe Nick rubble January $50 $52 $49 Feburary $52 $52 $40 March $52 $52 $40 and so on for each year in different table. The year as field type for month and client as field type for amount. Link to comment https://forums.phpfreaks.com/topic/145919-print-values-in-order/ Share on other sites More sharing options...
Ayon Posted February 19, 2009 Share Posted February 19, 2009 try using GROUP BY month Link to comment https://forums.phpfreaks.com/topic/145919-print-values-in-order/#findComment-766070 Share on other sites More sharing options...
divinequran Posted February 25, 2009 Author Share Posted February 25, 2009 I have tried with group by and order by. i list the value as in first table i want those data to be printed in specified order as i mentioned earlier. Link to comment https://forums.phpfreaks.com/topic/145919-print-values-in-order/#findComment-771207 Share on other sites More sharing options...
premiso Posted February 25, 2009 Share Posted February 25, 2009 I have tried with group by and order by. i list the value as in first table i want those data to be printed in specified order as i mentioned earlier. That is great that you tried. But post the code you are using to try with. Maybe then you will get your problem resolved. Link to comment https://forums.phpfreaks.com/topic/145919-print-values-in-order/#findComment-771241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.