Darkness Soul Posted October 3, 2006 Share Posted October 3, 2006 Yo,I need a little help, maybe its simple, but i don't know how to do it!At the index page, I have a table, with cars to be sold! like..[table][tr][td]id ---[/td][td]36x ---[/td][td]60x ---[/td][/tr][tr][td]1 [/td][td]15[/td][td][/td][/tr][tr][td]1 [/td][td][/td][td]8[/td][/tr][tr][td]2 [/td][td]10[/td][td][/td][/tr][tr][td]3 [/td][td]25[/td][td][/td][/tr][tr][td]3 [/td][td][/td][td]12[/td][/tr][/table]What I'm suppose to do, to sum these rows, and return something like it?:[table][tr][td]id ---[/td][td]36x ---[/td][td]60x ---[/td][/tr][tr][td]1 [/td][td]15[/td][td]8[/td][/tr][tr][td]2 [/td][td]10[/td][td][/td][/tr][tr][td]3 [/td][td]25[/td][td]12[/td][/tr][/table]The data come from 3 tables, using joins.. someone know how i do to simplify this table?Thank you!!D.Soul Quote Link to comment Share on other sites More sharing options...
fenway Posted October 3, 2006 Share Posted October 3, 2006 Oh... you want to collapse/compress this layout... it sounds like you'll have to do it yourself in PHP, if you're getting back one row-one record. It may be possible do accomplish this with a very ugly looking query, but I don't really see the point. Quote Link to comment Share on other sites More sharing options...
Darkness Soul Posted October 3, 2006 Author Share Posted October 3, 2006 I think about use an aux table to record it with the PHP, and then, liten all compressed.. =) Thank you anyway ^^D.Soul 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.