FW: [PHP-WIN] Access sql question

From: Date: Tue, 10 Oct 2000 12:36:53 +0000
Subject: FW: [PHP-WIN] Access sql question
Groups: php.windows 
Request: Send a blank email to php-windows+get-3090@lists.php.net to get a copy of this message
New error is: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error. in query expression 'select department'., SQL state 37000 in SQLPrepare in D:\InetPub\wwwroot\is\website\test_center\access\dbinsert.php on line 54 $sql = "INSERT INTO hello (department,telephone,address1,address2,city,state,zip,floor) values( select department,telephone,address1,address2,city,state,zip,floor from hello2);"; --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 > -----Original Message----- > From: UHL Fabrice [mailto:UHLFA@e-i.com] > Sent: Tuesday, October 10, 2000 8:27 AM > To: 'Asendorf, John' > Subject: RE: [PHP-WIN] Access sql question > > > try > > $sql = "INSERT INTO hello > (department,telephone,address1,address2,city,state,zip,floor) > values( select > department,telephone,address1,address2,city,state,zip,floor > from hello2);"; > > ----------------------------------------------------------- :O) > UHL Fabrice > EID MICRO équipe CTI > C.T.I : 03.88.24.89.16 CIAL > Tél. : 03.88.37.72.35 31, RUE JEAN WENGER-VALENTIN > Fax.: 03.88.37.71.99 67000 STRASBOURG > > > > > > -----Message d'origine----- > De: Asendorf, John [mailto:JAsendorf@lcounty.com] > Date: mardi 10 octobre 2000 14:26 > À: alain@samoun.com; Php-Windows@Lists. Php. Net (E-mail) > Objet: RE: [PHP-WIN] Access sql question > > > In a quick test I get: > > Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] > Syntax error. > in query expression 'select > (department,telephone,address1,address2,city,state,zip,floor) > from hello2'., > SQL state 37000 in SQLPrepare in > D:\InetPub\wwwroot\is\website\test_center\access\dbinsert.php > on line 55 > > with this syntax > > $sql = "INSERT INTO hello > (department,telephone,address1,address2,city,state,zip,floor) > values( select > (department,telephone,address1,address2,city,state,zip,floor) > from hello2);"; > > hello and hello2 are just tables I copied from our directory... > > > --------------------- > John Asendorf - jasendorf@lcounty.com > Web Applications Developer > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > Licking County, Ohio, USA > 740-349-3631 > > > > -----Original Message----- > > From: alain samoun [mailto:alain@samoun.com] > > Sent: Monday, October 09, 2000 9:52 PM > > To: Php-Windows@Lists. Php. Net (E-mail) > > Subject: [PHP-WIN] Access sql question > > > > > > Slightly OT: > > I'm not too familiar with Access db, can I do something like: > > $sql = "insert into table2 (field1,field2) values( select > > (field1n,field2n) > > from table1)"; > > where the corresponding fields have the same type. > > Message from Alain Samoun > > alain@samoun.com > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#3090) next »