RE: [PHP] Importing Data into Mysql

From: Date: Fri, 28 Sep 2001 12:12:20 +0000
Subject: RE: [PHP] Importing Data into Mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69162@lists.php.net to get a copy of this message
Something like this: 1. write each row separated by \n 2. write each field in the row separated by quote-coma-quote (replacing comas with something else and adding a backslash before any single quote). 3. copy into an array every field you have in the same order as they appeared on the file and add an ");\n INSERT INTO table .... (field1, field2, field3, ...) VALUES(' That is a dump file. You may also add some comments and other functions if wish. Maxim Maletsky www.PHPBeginner.com -----Original Message----- From: George Pitcher [mailto:fmdev@yahoo.co.uk] Sent: venerdì 28 settembre 2001 13.57 To: Maxim Maletsky (PHPBeginner.com); php-general@lists.php.net Subject: Re: [PHP] Importing Data into Mysql Maxim, I am interested in this concept. I have some big Filemaker databases which I can export in a number of formats. What I would like to do is to be able to create the table and import the data using the first row as field names etc. This is because there are over 300 fields in one of the DBs (13000 records). Any suggestions? George P, in Edinburgh ----- Original Message ----- From: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com> To: "'Jon Farmer'" <jonfarmer@enta.net>; "'Stephen Phillips'" <Stephen.Phillips4@btinternet.com>; <php-general@lists.php.net> Sent: Friday, September 28, 2001 12:31 PM Subject: RE: [PHP] Importing Data into Mysql Creating a dump file is the most universal and secure way. Basically, with any possible language in the world you can write into files, then, adding INSERT bla bla into each line will make you a mySQL dump file. And, with any other method you like you can send this file to mySQL server to import. That is why this method is so useful. Maxim Maletsky www.PHPBeginner.com -----Original Message----- From: Jon Farmer [mailto:jonfarmer@enta.net] Sent: venerdì 28 settembre 2001 12.39 To: Stephen Phillips; php-general@lists.php.net Subject: Re: [PHP] Importing Data into Mysql >Bit off topic this, but does any one know of an easy way to import a database in another >format into Mysql other than exporting it to text or straight to mysql via ODBC? >I'm quite new to this so I'm just trying to sus it all out :) Whats wrong with either of those two methods? -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send blank email to pgpkey@bctech.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#69162) next »