Re: Re: Load data and Insert

From: Date: Wed, 11 Aug 2004 17:08:05 +0000
Subject: Re: Re: Load data and Insert
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-193474@lists.php.net to get a copy of this message
On Wed, 11 Aug 2004 12:49:22 -0300 (ART), Juan Pablo Herrera <juampi@linuxeducativo.com.ar> wrote: > > "Torsten Roehr" <roehr@zilleon.com> wrote in message > > news:20040811150349.86315.qmail@pb1.pair.com... > >> "Juan Pablo Herrera" <juampi@linuxeducativo.com.ar> wrote in message > >> > >> news:1660.200.69.0.166.1092236555.squirrel@linuxeducativo.com.ar... > >> > Hi! > >> > i need do two querys in one. > >> > First query is a load data and the second query is insert into. My > >> > idea is to concatenate with "and", but i'not know. > >> > Is it possible? > >> > > >> > Regards, > >> > Juan > >> > >> Please specify a bit more clearly *what* data you want to load *from > > where* > >> and insert into *what*. Then we may be able to help you. > >> > >> Regards, Torsten Roehr > > > > If you refer to MySQL you can use the INSERT ... SELECT syntax to do > > this in one query. See here: > > http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html > > > > Regards, Torsten Roehr > > > > It's OK, but i need concatenate "load data" with "insert". > I have a file *.cvs that used three fields (a,b,c), my database have four > fields(a,b,c,d). The "insert" have the data for last field. > Regards, > Juan > I assume you means a csv file, not a cvs file. No, you can't directly load it into Mysql. Yes, you can load it into PHP and then do an INSERT with that data. Google for PHP CSV. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#193474) next »