Jump to content

Archived

This topic is now archived and is closed to further replies.

shiva

Hi again

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
Guest edwinsweep
hey shiva are you the one from holland zaandam????

Share this post


Link to post
Share on other sites
[quote author=shiva link=topic=103278.msg413020#msg413020 date=1155192322]
No:) Not from Holland
[/quote]
damn
well ok
a friend of mine is called shiva!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.