PHP Classes

Use with BD

Recommend this page to a friend!

      Gantt Chart Class  >  All threads  >  Use with BD  >  (Un) Subscribe thread alerts  
Subject:Use with BD
Summary:table structure to use the class with a bd
Messages:7
Author:Alexandre Miguel de Andrade Souza
Date:2005-12-15 19:42:02
Update:2011-02-03 00:23:20
 

  1. Use with BD   Reply   Report abuse  
Picture of Alexandre Miguel de Andrade Souza Alexandre Miguel de Andrade Souza - 2005-12-15 19:42:02
Someone ask me by email how do integrate the class with a bd and then what will be a needed structure . My answer was (in portuguese, the field names can be others, it is just to understand):

Eu desenvolvi apenas a classe, a integração com o bd é feita por outra pessoa.

Mas basicamente a estrutura seria assim, para a geração da classe apenas, outros campos poderiam ser adicionados para serem usados pelo seu sistema.
---------------------------------------------------------------------------------
tabela projetos

id do projeto
titulo
data inicio
data fim
descricao (opcional, etc)

Obs: a data de inicio e fim do limit da classe não precisam necessariamente ser do projeto, vc pode configurar para ver apenas um período do projeto.



tabela grupos (opcional-> na classe vc pode setar todas as fases para um grupo [0] e habilitar a opção de ignorar grupos -> é o que está sendo feito hoje no nosso sistema)

id do grupo
id do projeto
nome do grupo
data inicio
data fim

tabela fases planned

id da fase
id do grupo (opcional)
id do projeto
nome da fase
data inicio
data fim

tabela fases planned_adjusted (opcional, somente se quiser comparar modificações realizadas ao longo do projeto nas datas previstas - armazena apenas a última modificação - quando criar um registro na planned crie uma cópia aqui, e à medida que houver alterações nas datas previstas altere essa tabela aqui, a planned não deve ser mudada)

id da fase (tem que ser a mesma da fase planned)
id do grupo (opcional)
id do projeto
data inicio
data fim


tabela milestones (se for usado)

id do milestone
id do grupo (opcional)
id do projeto
nome do milestone
data milestone

-------------------------------------------------------------------------

Esses seriam campos essenciais para a geração da classe a partir de um bd.

Cada um desses valores seria atribuido àos arrays da classe, por meio de consultas. Para isso veja o exemplo da classe.


--

  2. Re: Use with BD (english version)   Reply   Report abuse  
Picture of Alexandre Miguel de Andrade Souza Alexandre Miguel de Andrade Souza - 2006-10-19 10:11:25 - In reply to message 1 from Alexandre Miguel de Andrade Souza
I develop only the class, the db integration was done by other person.

Basically the structure to generate the class would be:

---------------------------------------------------------------------------------
table projects

project_id
project_name
start_date
end_date
(base_line and adjusted start and end_dates, optional)
(description, optional, just to your software)


table groups ( optional) -> you can configure all phases to a group [0] and set the option of ignore groups(
$definitions["not_show_groups"] = true )

group_id
project_id //to select the correct groups by project
group_name
start_date
end_date


table phases_baseline(optional, phase = task to you) -> it is to remember first planning of project, so you can compare with the changes along the time.

tabela phase_baseline

phase_id
group_id(opcional)
project_id
start_date
end_date


table fases planned_adjusted (optiional, only if you want to record the changes in the project -> versions with the time)

phase_id
version
group_id(opcional)
project_id
start_date
end_date

table phases_planned -> the last version of project

phase_id
group_id(opcional)
project_id
start_date
end_date

table milestones (optional) -> products or other important moments of the project

milestone_id
milestone_name
group_id(opcional)
project_id
date


-------------------------------------------------------------------------
this would be the essencial fields to generation of the class. Optionally, all other options of configuration would be set in tables, and passed to the class, but is up to you.

  3. Re: Use with BD   Reply   Report abuse  
Picture of david harmon david harmon - 2006-10-19 16:18:50 - In reply to message 2 from Alexandre Miguel de Andrade Souza
Hummm this is fine but it's not what I was looking for sorry.
what you have here is just a basic outline of the template. I was looking for a SOLID working model of taking data from a db "with code" and inputting that information into your Gantt Class producing a Real working model. this example that Iam looking for could be a very simple example with only one or two records just to show the actual working code doing the Gantt Chat display.
Anyone have a REAL working "code" model that shows this in operation???
Thanks

  4. Re: Use with BD   Reply   Report abuse  
Picture of pc.cesar pc.cesar - 2008-06-20 12:39:49 - In reply to message 1 from Alexandre Miguel de Andrade Souza
can you send me a gantt class with a db, i try but several erros

my email daliafaria@gmail.com

  5. Re: Use with BD   Reply   Report abuse  
Picture of dd dd - 2010-02-17 09:50:23 - In reply to message 2 from Alexandre Miguel de Andrade Souza
Hello, I'm working on the bugtracker flyspray to integrate the gantt model in roadmap.
is it possible to send me a class with a db connection ?

Thanks.
regards.
zopinette93

  6. Re: Use with BD   Reply   Report abuse  
Picture of Bernabe Aguirre Carrasco Bernabe Aguirre Carrasco - 2011-02-03 00:23:25 - In reply to message 1 from Alexandre Miguel de Andrade Souza
can you send me a gantt class with a db,

my email tcreamype@yahoo.com.es

thanks

  7. Re: Use with BD   Reply   Report abuse  
Picture of Talal Dayekh Talal Dayekh - 2016-09-15 14:35:38 - In reply to message 1 from Alexandre Miguel de Andrade Souza
Hi Alexandre,

Can you send me a gantt class with a db?

My email jdayekh@hotmail.com

Many thanks