search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

uploading data

Related article: HTML5 Timesheet (JavaScript, PHP)
Asked by Talon
6 years ago.

From what I understand, the tutorial talks about adding data for events, but not for employees. I see you have a JSON output for employees but no mention of where that data is added into the system. If you could enlighten me, it would be greatly appreciated.

Answer posted by Dan Letecky [DayPilot]
6 years ago.

It turns out that the project included an incorrect version of _db.php that initializes the database. A fixed project is now available for download.

The employees are stored in the database, in a table called "resources" with the following structure:

CREATE TABLE resources (
        id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
        name VARCHAR (200)
);

Let me know if it doesn't work as expected.

Comment posted by Talon
6 years ago.

Dan,

The updated version worked as expected. Thank you.

This might outside your scope but is there a way of importing data from a MySQL database into the timesheet database? Any guidance you could offer would be appreciated.

Comment posted by Dan Letecky [DayPilot]
6 years ago.

Normally you'd want to modify the scripts to connect directly to your existing MySQL database and use your live data (instead of copying it to somewhere else). As long as you keep the output JSON format you can use any DB structure (you don't have to modify your MySQL database).

The file-based SQLite database that comes with this project is used to make it easier to run and test the application (without any configuration).

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.