0

I'm a student and i am just starting on PHP and jQuery programming. I have this project which happens to be a Project Management Web Application.

The question is when I allow users to edit Created Tasks let's say from 2013-08-10 to 2013-08-15 and then how would I adjust the other tasks' date that is a predecessor of the edited tasks. One application that does that is Zoho Projects (https://projects.zoho.com/) I really need your help. I have to pass this project tommorow for pre-checking.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    Can we see your database structure, and the PHP code you have presently? I should imagine it would require a query that updates tasks that are in some way recorded as being on the same timeline, and that have a later date than the modified task. – halfer Aug 09 '13 at 11:28
  • Hello and welcome to stackoverflow. As there are some very skilfull programmers hanging arround, most of them are not soothsayer. Could you provide a [SSCC ecample](http://sscce.org/) of your code? In addition, in order to obtain most meaningful answers, you should perhaps check the [Stack Overflow question checklist](http://meta.stackexchange.com/questions/156810/stack-overflow-question-checklist) and edit your question accordingly. – Sylvain Leroux Aug 09 '13 at 12:08
  • "I have to pass this project tommorow for pre-checking." :D It is really time to make some researches about your project! – Sylvain Leroux Aug 09 '13 at 12:09
  • Thanks for your help. I ll give my database stucture in a moment. – Juno Paulo De Guzman Oct 11 '13 at 16:50

1 Answers1

0

Very rudely, one solution is:

  • In you database you should have the relation between tasks (usually an PARENT_ID column with a foreign key to the parent task)
  • In your PHP code when you update one task you should validate if this task is PARENT of other task. If so, you need to update the child task(s).

P.S. One idea to optimize PHP code may be getting all the tree of dependent tasks in one query instead of doing it recursively.

Luís Maia
  • 11
  • 1
  • Thanks ,but another question is how would I know if the date should be updated. I mean what i like is I should update other dates only if would overlap each starting dates.. – Juno Paulo De Guzman Oct 11 '13 at 16:48