note 14795 added to function.odbc-exec.php

From: Date: Wed, 15 Aug 2001 06:25:15 +0000
Subject: note 14795 added to function.odbc-exec.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16743@lists.php.net to get a copy of this message
If you're receiving a 'Syntax error in INSERT INTO ..<snip>.. SQL State 37000 in SQLExecDirect' error, try enclosing the field names between square brackets. ex: INSERT INTO whatever ([blah],[who],[what]) VALUES ('blah','blah','blah'); I spent 4 hours tryin to get this insert statement (without the []'s) to work. This seems to have fixed it. []'s, apparently according to MS, should be used with table/field names with spaces. Im not sure if this is an MS ODBC thing, or a PHP flaw. tested with: win32/php4.0.6/apache1.3.20/odbc/mdac2.6sp1 http://www.php.net/manual/en/function.odbc-exec.php

« previous php.notes (#16743) next »