Create an agenda for within the app

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Eric1982
User
Posts: 57

Create an agenda for within the app

Post by Eric1982 »

How can I create an agenda for the webbased app ? If this is possible ?


mobhar
User
Posts: 11736

Post by mobhar »

You should be able to create any web app using PHPMaker as long as its requirement is clear enough to implement it.


Eric1982
User
Posts: 57

Post by Eric1982 »

Thanks, can you help me with some resources (links) to make a start ? I am new to PHPMaker and I don't have a clue yet how to start building an agenda / calendar.


mobhar
User
Posts: 11736

Post by mobhar »

Just Google for "php calendar class" then you will find some useful resources.


Eric1982
User
Posts: 57

Post by Eric1982 »

Thanks. So the code I can actually copy and paste into the 'Server events' area, right ?


mobhar
User
Posts: 11736

Post by mobhar »

It actually depends on your needs. Server event is usually used if you need to execute your own code based on the specified event.

However, try to put the related code via Custom Files in your PHPMaker project to play with your calendar class code.


rodrigofaustino
User
Posts: 5
Location: brazil

Post by rodrigofaustino »

I could do as
create the tables
CREATE TABLE agend (
id int NOT NULL,
data DATE NOT NULL
day_sem INT NOT NULL,
sem_year INT NOT NULL,
PRIMARY KEY(data)
) ENGINE=MyISAM;

and

CREATE TABLE number (
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id)
) ENGINE=MyISAM;

and
INSERT INTO number VALUES(NULL);
INSERT INTO number SELECT NULL FROM number ; // running 12 times = 4096 records

and

INSERT INTO agend
SELECT
DATE_ADD('2015-01-01', INTERVAL id-1 DAY),
DAYOFWEEK(DATE_ADD('2015-01-01', INTERVAL id-1 DAY))-1,
WEEKOFYEAR(DATE_ADD('2015-01-01', INTERVAL id-1 DAY))
FROM number ;
and
CREATE TABLE tarefa (
codtarefa INT NOT NULL AUTO_INCREMENT,
codusuario INT NOT NULL,
codtiporepeticao INT NOT NULL,
dtainicio DATE NOT NULL,
PRIMARY KEY(codtarefa)
) ENGINE=innodb;

this far already have the agenda
Now create the table that will be related to tasks or activities

CREATE TABLE ativict (
codativict INT NOT NULL AUTO_INCREMENT,
codusur INT NOT NULL,
codservant INT NOT NULL,
starttime time NOT NULL,
endtime time NOT NULL,
iddata int NOT NULL,
PRIMARY KEY(codativict )
FOREIGN KEY(iddata ) REFERENCES agend (id)
) ENGINE=innodb;

table daughter activity will be on the agenda
and PHPMaker relate the table calendar >>> activity
to be saved several atividas for a day and a day has several activities
the rest depends on your imagination and the power of PHPMaker
I have helped


Eric1982
User
Posts: 57

Post by Eric1982 »

When I try the first one, I get an error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'day_sem INT NOT NULL, sem_year INT NOT NULL, PRIMARY KEY(data) ) ENGINE=M' at line 4

Did I overlooked something ?


scs
User
Posts: 694

Post by scs »

rodrigofaustino wrote:

data DATE NOT NULL

Check your script.

No comma "," found at the end if this line.


Post Reply