shiva Posted August 7, 2006 Share Posted August 7, 2006 I did some studying on PHP and now can create tables, connect to mysql, send arguments etc... know about _get and _post also.... now my question is....Hhow to manipulate table data so that I can choose values from a set of different tables, may be apply a formula and then display results in another table?For example, I would like to take "work_done" from yesterday's table and add it to "work done" in today's table and display it as "total work completed" in a third table.Hints, tips or answers would be appreciated :)Thanks in advance :)Shiva Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/ Share on other sites More sharing options...
tvdhoff Posted August 7, 2006 Share Posted August 7, 2006 Hi,You don't need extra tables: you could add an extra column called 'status' and give each of those possibilities a value, ie. 'Work Done' = '1', 'In Progress'=2 etc. You could create an extra table to store those status IDs and add a column for the names that go with it.If you really want to store it in a new table you would need to make a combined create table and select statement, like:[code]CREATE TABLE worktomorrow SELECT values,work,now FROM worknow;[/code] Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-70625 Share on other sites More sharing options...
Daniel0 Posted August 7, 2006 Share Posted August 7, 2006 [quote author=shiva link=topic=103278.msg411154#msg411154 date=1154954339]For example, I would like to take "work_done" from yesterday's table and add it to "work done" in today's table and display it as "total work completed" in a third table.[/quote]Instead of having one table per day, you could have an extra field in the table called date, and then store the day or a UNIX timestamp in that field. Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-70657 Share on other sites More sharing options...
shiva Posted August 8, 2006 Author Share Posted August 8, 2006 Thanks tvdhoff and Daniel0 :) Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-71087 Share on other sites More sharing options...
Guest edwinsweep Posted August 8, 2006 Share Posted August 8, 2006 hey shiva are you the one from holland zaandam???? Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-71100 Share on other sites More sharing options...
shiva Posted August 10, 2006 Author Share Posted August 10, 2006 No:) Not from Holland Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-72316 Share on other sites More sharing options...
Silverado_NL Posted August 10, 2006 Share Posted August 10, 2006 [quote author=shiva link=topic=103278.msg413020#msg413020 date=1155192322]No:) Not from Holland[/quote]damnwell oka friend of mine is called shiva! Link to comment https://forums.phpfreaks.com/topic/16790-hi-again/#findComment-72406 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.