0

Hey guys, i am currently working on a project.
It's a web application for registering the amount of time an employee has worked. I have written the web app for adding a new employee and for adding a timestamps( e.g work done). Now my problem is like this i need to be able to access the two tables in the database and from there converting them to xls documents, preferably using c++.
Anyhow my two questions are
1. I have seen a lot of the .cvs file format but my tables are of the .frm format along with a .MYD and .MYI files , could somebody explain this to me.
2. Does anyone know a method to gather this data and write it to an .xls document ??

Thanks.
//K0ns3rv

Edited by K0ns3rv: n/a

2
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by K0ns3rv
1

The simplest solution for your problem is to query all the data you need through your web application or C++ application and save them into csv or xls format. This is accomplished easier if you do this through your PHP application.

If you're using PHP you can use libraries like this or this.

Those .frm files are the MySQL table data, you shouldn't be messing with them. Just query it and extract the data.

0

The simplest solution for your problem is to query all the data you need through your web application or C++ application and save them into csv or xls format. This is accomplished easier if you do this through your PHP application.

If you're using PHP you can use libraries like this or this.

Those .frm files are the MySQL table data, you shouldn't be messing with them. Just query it and extract the data.

For now i've created the datebase using
mysql_query("CREATE DATABASE").
In my database i've created two tables.
I am abit confused, how exactly would i save them as .cvs ?

0

First download something like Mysql Commander so you can create the database and tables graphically - Mysql CC

Then use Mysql query to query your data using SELECT commands. and get them into PHP. Look at this thread on concrete examples on how to query it. Once you have the data, just go through them one by one and write them to a file.

PHP has a built in function for this. You can find it here - http://php.net/manual/en/function.fputcsv.php

Sorry for not including examples, but I'm on my way out. Hope this helps

Edited by jomanlk: n/a

0

First download something like Mysql Commander so you can create the database and tables graphically - Mysql CC

Then use Mysql query to query your data using SELECT commands. and get them into PHP. Look at this thread on concrete examples on how to query it. Once you have the data, just go through them one by one and write them to a file.

PHP has a built in function for this. You can find it here - http://php.net/manual/en/function.fputcsv.php

Sorry for not including examples, but I'm on my way out. Hope this helps

Yay graphical ediot was just what i need thanks mate

0

I will mark the thread solved soon, just gotta make sure i don't have anymore questions.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.