HY I HAVE THIS SQL CODE

select id,category,sum(q1) Total from articles group by category order by id

AND I WHANT TO INTEGRATE IN MY PHP SCRIPT TO SHOW IT LIKE A TABLE INCLUDING THE TOTAL, HOW CAN I DO THIS ?

I think you can do it with rollup.. There is one example there that pretty much identical to yours.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.