in your sql command there are several errors:

it has the form

INSERT INTO (<list of fieldnames>) 
VALUES (<list of values>);


- there are more items in the list of values than in the list of
fieldnames. these lists should match.
- there's an extra comma after fieldname 'unico', and the closing ) is
- you dont need apostrophes for numeric fields. you get the table
definition using sql command 'DESC tablename'
(- and the tablename -was- missing :)

hope this helps,



mweb wrote:
> Hello,
> On the same database, this query works:
> $SQL_Exec_String = "INSERT INTO Multimedia (Titolo,Descrizione,Logo,Link)
> VALUES ('prova titolo','prova descrizione','.gif','prova link');";
> $cur= odbc_exec( $cnx, $SQL_Exec_String );
> This one gives this error:
> ISQL_exec_String = "Insert Into (Artista, Opera, Label, Anno, Nazione, CDNow,
> Autore, AutoreNome, Genere, GenereCustom, SulWeb, Autorizzato, Unico, VALUES
> ('prova2', 'inedita', 'ignota',
> '2001','IT', 'nonesiste', 'io', 'lui','3', 'ulteriori dettagli sul genere
> musicale', 'http://www.no.it', '1', '20011205111456', 'asdas erfver', 'ciao
> ni', '2.5', 'Non andare a capo!');"
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
> INSERT INTO statement., SQL state 37000 in SQLExecDirect in
> C:\domini\m.net\inserzione3.php on line 115
> Error in odbc_exec( no cursor returned )
> Does the second qyury look syntactically wrong to you? May it be that some
> column name or quoting is wrong, or some value I try insert is not matching
> the column type? If so, why would this be a *syntax* error?
> Is it possible to query access via Php so that it will tell the internal
> strucure of the table?
> (this database was developed and left online by somebody else, that's why
> I don't have all this info)
> Any help is greatly appreciated, as are working sql statements for similar
> (php+odbc+access) cases.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to