hi there,
I got some prob here hope you can help out.
Need to create a simple stock management program. Done all great but accounter 2 probs.
1
need to find an easy way to do some calculations like additonning amount in a column. like after having the amount by multiplying QTY*Unitprice in a column called Amount, I want to add all the amount in the column to have the total amount Per order or per invoice for example. Hope you have easy way of doing this.
2
I want to print out. But I can not get a good looking printout eventhough it look great on the computer screen.
Or is there an easy way of exporting the table in excel where i can carry out necessary calculation and print out?
Will appreciate your help.
Database help
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
- typically done like so:
Code: Select all
SELECT SUM(QTY*Amount) FROM `table` WHERE `condition` = 'foo' - generating a PDF can be a good solution, setting up the screen to work properly with printing it directly can also work. You could export the information as a CSV as well (there has been talk about this a LOT here, look through the Code Snippets board. I blieve one is in there..)