Page 1 of 1

Create an agenda for within the app

Posted: Sun Nov 23, 2014 3:27 pm
by Eric1982

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


Re: Create an agenda for within the app

Posted: Mon Nov 24, 2014 9:49 am
by mobhar

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


Re: Create an agenda for within the app

Posted: Mon Nov 24, 2014 4:36 pm
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.


Re: Create an agenda for within the app

Posted: Mon Nov 24, 2014 6:13 pm
by mobhar

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


Re: Create an agenda for within the app

Posted: Tue Nov 25, 2014 1:15 pm
by Eric1982

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


Re: Create an agenda for within the app

Posted: Wed Nov 26, 2014 10:46 am
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.


Re: Create an agenda for within the app

Posted: Thu Dec 04, 2014 5:40 pm
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


Re: Create an agenda for within the app

Posted: Sat Dec 13, 2014 7:16 pm
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 ?


Re: Create an agenda for within the app

Posted: Sun Dec 14, 2014 1:44 pm
by scs

rodrigofaustino wrote:

data DATE NOT NULL

Check your script.

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