I'm having problems with exporting/importing a database,
it seems like that PHPMyAdmin won't export database-table-relation settings and I can't get my views to work.
any ideas what's wrong / how I can export anything related to the database?
I was trying to fully import the database by completely deleting first then create a new database and import from .sql file.
Try this:
1) On export option check custom option.
2) Search for "Object creation options" check "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement" option.
Let me know if this works for you.
Related
I am currently in a project which develops (actually re-designs) a news company website. Their old website had been developed using Wordpress (Latest version). And, now we are developing brand new custom design website using PHP and MySQL. But, they have over 10,000 news (posts) on old wordpress database. All I need to know is, how do we import all those post data to our main database? Our database and table structure is way different from wordpress one. Are there any SQL commands to import just only single or couple of columns data and paste them to another database table? Your help is highly appreciated.
Pull them down into a CSV, update the fields as required, import them into MySQL...
A CSV is a file of Comma separated values: https://en.wikipedia.org/wiki/Comma-separated_values
Plugin to get Posts as CSV: https://wordpress.org/plugins/simple-csv-xls-exporter/
Edit the field names (in a text editor or something that can edit CSVs and save them correctly), remove data you don't require etc etc. then import into your database.
Here's a handy link to import CSV into MySQL: How to import CSV file to MySQL table
Does that make sense?
If you know how to use MySQL , you make queries that can fetch the data and like that you can fetch all the data from MySQL import it in a way that you need in your new website and export it there. if You don't understand.
Step 1 :
Know that is required this is very basic step, you should know what you need and make a list of it.
Step 2 :
Make MySQL queries and fetch the data according to your database structure, use excel if your not so good in MySQL , organized as data as requirement
Step 3:
Now you will have all the data, you can either convert that to csv or sql format and insert in to your database easily.
I have a big database in Access with products I want to insert in Prestashop!
I've read about the database import in prestashop but didnt find anything about access db import. Is there a way to import this database in prestashop?
Or am I supposed to write sql queries to add these products. I have read the source code of prestashop like Products.php or ObjectModel.phplike said here:http://stackoverflow.com/questions/16068141/prestashop-insert-products-script. So is the only way to write sql queries?
Thanks!
PrestaShop have tools to import products from CSV, you can check it in BO > Advanced Parameters > CSV Import. You can choose what you want to import, products, categories, attributes etc. If your file is too big you supposed to split it to few small files.
As Agnes said CSV will be the option.
Since I still don't have enough rep I can comment on his response but I'd like to add that in the CSV import page you can find templates for the CSV may be useful if you are not used to Prestashop Product Fields.
Also if you upload the images to a temporal folder and add the URLS in the product CSV the images will be imported and added to the product.
If is the first product upload I'll also recommend you to set up the IDs for the products this way if something doesn't fit or you want to change the uploaded products you can do it just by ID or simply delete all previous products and import the new ones.
Good luck.
Import is very complecated in PrestaShop, and not really fonctionnal.
I recommand to use the module Migration pro. Is a paid module, but it works really fine, i've used it a lot.
Otherwise, you can read this article (in french), you have the list of table to import. After that, you can import images and regenerate them.
Good luck ;)
Modern Prestashop can directly import xls/xlsx files
It is much better choice than CSV because you don`n have mess with field delimiters.
Export from Access to Excel should not be problem.
Native Import through web admin GIU is very good.
But you need some practice:
Make file with few products - you can delete them later if you not satisfied with results of import.
Look carefuly at field mappings. Maybe you will fail at first attempt or miss some mapping - thats why you need to import few products first.
If possible try to use the built in webservice api or you can make your own custom import module
I'm trying to import .sqlite file to sqlite3 im using windows 8 pc,
It's throwing an error of
expected 5 rows found 1-rest filled with null
even my table columns are fine.
can anyone please help me.
thank you in advance.
I think you can try this method. So you don't have to import/export via third-party files such as csv or any additional software. I plan to do this method to periodically copy aquired data in a RAMDRIVE-placed database to the SD-Card. Of course sqlite3 must be able to load your database in your case.
ATTACH DATABASE 'foo.sqlite' AS 'foo';
.databases
INSERT OR REPLACE INTO 'main.mytable' SELECT * FROM 'foo.mytable';
DETACH DATABASE 'foo';
.databases
check here for ATTACH syntax and here for more INSERT variations.
What you can do is use a third party tool called SQLite Database Browser (http://sourceforge.net/projects/sqlitebrowser).
Using the sqlite browser, open your database in old format (.sqlite) and then click File -> Export -> Database to SQL file.
Now, close the database. Create a new database using SQLite Browser (it automatically generates the database in the new SQLite3 format). Once a database is created, use the File -> Import -> Database to SQL file into the new database in SQLite3 format.
You use the PHP sqlite API to use an .sqlite database.
See http://php.net/manual/en/book.sqlite.php
In general you supply the path to your .sqlite file in the sqlite_open() call, see for an example the manual page of sqlite_open:
http://www.php.net/manual/en/function.sqlite-open.php
This question already has answers here:
Export and Import all MySQL databases at one time
(13 answers)
Closed 9 years ago.
I have created a MySQL database for a website in xampp. Today got my new server which is running Ubuntu. Everything is installed and working fine.
I want to move database which I created in xampp and move it to my server; can someone tell me how to do this? The database is created with phpMyAdmin.
Best regards!
Emil
Export data in PHPMYADMIN
1) Log in to the phpMyAdmin instance on the source server.
2) Click the Export tab
3) From the database drop-down (left navigation), select the database.
4) Choose between a Quick or a Custom export. The Quick method should work most of the time, though if you need to get more granular with your export options, click Custom If you choose Custom, you can configure the following:
a) Tables: Choose which tables to export.
b) Output: Choose the template, character set, and compression for the export.
c) Format: Choose to display comments, enclose the export in a transaction, disable foreign key checks, dump table (structure, data, or both).
d) Object creation options: Add statements.
5) Data dump options: Use INSERT DELAYED or INSERT IGNORE statements, select the function to use when dumping data, select the syntax to use when inserting data, maximal length of created query.
6) Select the format from the Format drop-down (select SQL).
7) Click the Go button.
8) Save the file (which, by default, should be named db.sql).
Import data in PHPMYADMIN
1) Log in to phpMyAdmin.
2) Create an empty database from the Databases tab
3) Click the Import tab.
4) Click the Browse button.
5) Locate the file to be imported.
6) Click Open or OK, depending on your browser.
7) Select the proper collation from the drop-down.
8) Select the format of the import file.
9) Click Go.
Reference taken from : Phpmyadmin Export Import
i have been reading around looking for a way to get graphs and so on into my spread sheet i export out of my database and to make it look better for my employee who wants reports of everything in a certain way and so on. I have found PhpExcel.. which seems really good it can do everything i want it to plus more.. but i haven't been able to work out how to use data from my mysql table to fill in the cells since it seems like they all have to be manually set to a value...
i have read over this post How to set cell value Dynamically
i have attempted to use the code provided in this page to try and help me out but i havent been able to get it to work for some reason i am always receiving an error.
i am hoping someone may be able to help me out with trying to get this MySQL table data into a spreadsheet using php excel or even if there are any other links i may have missed i would really appreciate it...
If you install phpmyadmin to connect to your database.
Then you can write SQL queries for whatever reports you need.
And Export (see image 1) the results to CSV or CSV for MS Excel (see image 2).
Export option below the query results
Choose export data format
I have done this using the PEAR classes for PHP. You can read the data from the MYSQL database and then write the script using the PHP and PEAR classes to create an excel file for the same.
Here is link to the SpreadSheet Writer
This tutorial will help you to install PEAR and write the data to the excel sheet.
Hope this will solve the problem you are facing.
I'm doing a lot of work with PHPExcel... I wrote a little class to simplify exporting, you can download it here.
You just need to get your data from database into array, pass it to this class and specify the output format. I hope it helps.