I've a survey form that I need to get data from and put into a mySQL
database.
Easy, can do it eyes closed.
But, then I need to be able to take that same information and convert
it (either directly or pulling it back out from the database) into a
CSV (or any file for that matter) that can be easily imported, added
into an existing Excel database.
I've no idea how to do that. (I can query the database, that I can do,
and create recordsets, AND create text files, but I've never created a
CSV file before.)
Is there a source, a good Web site for example, that explains that
kind of process pretty well?
Thanks!
Liam
druid -at-celticbear -dot- com 3 6416 de**@celticbear.com (LRW) wrote in message news:<3a**************************@posting.google. com>... I've no idea how to do that. (I can query the database, that I can do, and create recordsets, AND create text files, but I've never created a CSV file before.)
Is there a source, a good Web site for example, that explains that kind of process pretty well?
Surely then you're familiar with the implode function? http://www.php.net/manual/en/function.implode.php
See example 1
CSV is just a text file with the fields/columns separated by commas..
"LRW" <de**@celticbear.com> wrote in message
news:3a**************************@posting.google.c om... I've a survey form that I need to get data from and put into a mySQL database. Easy, can do it eyes closed.
But, then I need to be able to take that same information and convert it (either directly or pulling it back out from the database) into a CSV (or any file for that matter) that can be easily imported, added into an existing Excel database.
I've no idea how to do that. (I can query the database, that I can do, and create recordsets, AND create text files, but I've never created a CSV file before.)
Is there a source, a good Web site for example, that explains that kind of process pretty well?
Thanks! Liam druid -at-celticbear -dot- com
It's easy really.
Just get the data line by line and write the values sepearated by a comma.
Don't forget to put a linebreak at the end of each line
eg: $line[]="$name , $address \r\n";
Then loop through the $line array and write file.
Hope this helps
RG
how can we write a data to csv file(Excel) from php or from database thr php.please help me :mad:
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michel |
last post by:
Hi,
I like to build a small simple dinamic website: Point-of-sale
(detail-shop), So entering stock, logging all sales, print out
invoices and download the logs to be imported into Excel.
I...
|
by: Jerry Weinstein |
last post by:
Hi,
I know about stored procedures and that they can speed up data entry via the
SQL 'insert ' statement.
However, one drawback to this method is that using the stored procedure
still requires...
|
by: Charles Alexander |
last post by:
Hello
I'm trying to redisplay and reorganize some data off a huge Excel
spreadsheet. I figured it would be easier to manipulate if I dumped the
data into MySQL with the help of phpMyAdmin.
...
|
by: bawar |
last post by:
Hey, I can say I belong to the newbies in this subject. I own my own
website with mySQL-databases, but now I have to show one table of
those mySQL-databases in an excel worksheet. It is the...
|
by: Luis Esteban Valencia |
last post by:
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source...
|
by: dimitri |
last post by:
i try to copy data from excel into my MySql database which runs on a
linux.
i use MS Access to access the database. i need to optain the unique id
number, and this is where i have some troubles....
|
by: Piotr |
last post by:
Hi,
I have following problem:
I use a form in excel to send data into mysql server, everything is ok
unless I have to deal with decimals or data fields, this simple are not
recognized.
For...
|
by: jrs_14618 |
last post by:
Hello All,
This post is essentially a reply a previous post/thread
here on this mailing.database.myodbc group titled:
MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode
I was...
|
by: roger.rigsby |
last post by:
Ok I know how to get the data I want from mysql but I need to actually
do something with this data and then send it back to mySQL.
Company heads love the spreadsheet view so this is serious...
|
by: runsun |
last post by:
I am new in PHP/Mysql. I want to input sth from website to mysql, then output the formatted data to .txt, and finally use Excel to open the .txt file. I believe there are better and simpler ways than...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |