473,466 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

exporting mysql

Hi

there is a function in phpmyadmin that exports all the data etc from a mysql
database to an sql text document, or Excel File.

I would like to know if there is an inherent way of doing this without
phpmyadmin. - straight through php.

thank you

andy

Jul 17 '05 #1
4 2076
Andy Levy wrote:
Hi

there is a function in phpmyadmin that exports all the data etc from a mysql
database to an sql text document, or Excel File.

I would like to know if there is an inherent way of doing this without
phpmyadmin. - straight through php.

thank you

andy


mysqldump will do this for you.

Usage: mysqldump [OPTIONS] database [tables]
http://www.mysql.com/doc/en/mysqldump.html
From a php script, you could probably use exec();
http://us2.php.net/exec
- Dan
http://blog.dantripp.com/
Jul 17 '05 #2
Hello!
I am also looking for that.

As far I know PhpMyAdmin can easily be installed in any PHP server,
with MySQL support.
I have it installed even in my localhost.

If nobody else gives you a direct answer,
I think you can look inside of PhpMyAdmin code and
locate the part of the code that do it.

If nobody else answer I will try to do it,
because as you, I also need this code.
And worse, I need to export MySQL to Access.
Download PhpMyAdmin from
http://www.phpmyadmin.net/
[]

Carlos

"Andy Levy" <an*******@hotmail.com> wrote in message news:<v%*****************@news-binary.blueyonder.co.uk>...
Hi

there is a function in phpmyadmin that exports all the data etc from a mysql
database to an sql text document, or Excel File.

I would like to know if there is an inherent way of doing this without
phpmyadmin. - straight through php.

thank you

andy

Jul 17 '05 #3
On 2004-02-03, Carlos Marangon <ar****@hotmail.com> wrote:
"Andy Levy" <an*******@hotmail.com> wrote in message
news:<v%*****************@news-binary.blueyonder.co.uk>...
Hi

there is a function in phpmyadmin that exports all the data etc from
a mysql
database to an sql text document, or Excel File.

http://www.phpfreaks.com/tutorials/114/0.php

--
http://home.mysth.be/~timvw
Jul 17 '05 #4
"Andy Levy" <an*******@hotmail.com> wrote in message news:<v%*****************@news-binary.blueyonder.co.uk>...
Hi

there is a function in phpmyadmin that exports all the data etc from a mysql
database to an sql text document, or Excel File.

I would like to know if there is an inherent way of doing this without
phpmyadmin. - straight through php.

thank you

andy


You can use MySQL command *mysqldump* to generate SQL Text file for
databases and tables. You can also run this command in a PHP script by
calling system command.

To dump your data in Excel Portable file, you can use MySQL command:

SELECT *
INTO OUTFILE "/tmp/result.text"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
FROM test_table;

This will dump data in CSV format, which can be read by MS Excel
program.

--
Hope it will help,
Rahul Anand
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: b1cq7 | last post by:
I'm exporting MySQL data using a sql script containing:: SELECT * FROM (database name) INTO OUTFILE (filename) FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; The file...
1
by: Alban Gerome | last post by:
Hi there, I'm trying to export a pictures table, my mySQL database table already exists so I have linked both tables in Access and I tried to run a simple append query in Access to export the...
2
by: James Alexander Starritt | last post by:
I also posted similarly in mailing.database.mysql I have created a rather large (60 table database) website dealio in PHP that works with MS SQL Server, Oracle, MySQL and presumably any other...
2
by: Peter | last post by:
Hi all, Quite by accident, I found the mysqldump utility, that comes with MySQL, which dumps/backsup a database, table, or record. It looks very versatile! Does PHP have a way to export...
6
by: Kevin Chambers | last post by:
Hi all-- In an attempt to commit an Access MDB to a versioning system (subversion), I'm trying to figure out how to convert a jet table's metadata to text, a la SaveAsText. The end goal is to...
9
by: Bob Sanderson | last post by:
I'm trying to export a table to an ODBC database using a VBA subroutine. I have tested the ODBC setup manually and it works fine but when I try to do it with VBA, I get a "connection failed" error....
6
by: mirianCalin | last post by:
i am doing the programming at home and our teacher checks it in school that's why i need to export/import my database.. but i dont know how.. i've found this instruction on the net but i cant...
1
by: cmgmyr | last post by:
Hey All, I'm having a little problem with exporting data from my database. The problem is that the query seems to be too much for PHP and MySQL to handle since it is timing out. I have the timeout...
0
zorgi
by: zorgi | last post by:
Hello guys Is there a way of exporting privileges tables from mysql database. I just need too transfer my developing database from one computer to another. Thanks
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.