salman233 Posted February 4, 2012 Share Posted February 4, 2012 guys i want help with little simple thing alright i want to make a pizza production mechanisum i have a input field pizza ------------------------ when i make 8 pizza,s in one day it should save 8 on that day on the next it should add those 8 previous day pizza including pizza made that days say 8+ 16 made today and so on adding previous days pizza and so on and good part is it should have a minus function too it should be like a calculator please help me out guys i am weak in maths Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/ Share on other sites More sharing options...
trq Posted February 4, 2012 Share Posted February 4, 2012 What's the problem exactly? Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314342 Share on other sites More sharing options...
salman233 Posted February 4, 2012 Author Share Posted February 4, 2012 i can,t figure out how to do it cause em a newbie Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314345 Share on other sites More sharing options...
trq Posted February 4, 2012 Share Posted February 4, 2012 You will need to store your quantities of pizzas made in a database or something and then use simple math to add and subtract. There are literally thousands of examples of how to insert and select data from a database using php already on the web. I suggest you find one and have a go. As far as the math is concerned, if you don't yet understand how to add and subtract, I suggest you forget about learning php for a while and start school over again. Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314347 Share on other sites More sharing options...
litebearer Posted February 4, 2012 Share Posted February 4, 2012 it should have a minus function too is that when you make 8 pizzas then eat two of them? Sorry couldn't resist Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314348 Share on other sites More sharing options...
salman233 Posted February 4, 2012 Author Share Posted February 4, 2012 ok brother please tell how to calculate sum of a row from database Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314353 Share on other sites More sharing options...
litebearer Posted February 4, 2012 Share Posted February 4, 2012 http://www.plus2net.com/sql_tutorial/sql_sum.php Quote Link to comment https://forums.phpfreaks.com/topic/256367-want-some-little-help/#findComment-1314354 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.