Wrox Programmer Forums
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 7th, 2003, 08:23 AM
Authorized User
Join Date: Sep 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQl and Microsoft

Trying to do an update with the following code:
$query=odbc_exec($odbc, " UPDATE phpInventory set NumberOnHand=$NumberUsed WHERE

ControlNumber like '$%ControlNumber%' and PartNumber like '$%PartNumber%' ");
$result = odbc_exec($odbc,$query);

I have verified that the connection string works(which is in an include statement)

Getting the following error: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'., SQL state 37000 in SQLExecDirect in d:\inetpub\wwwroot\sparepartsinv\action3.php on line 16

Old October 7th, 2003, 11:38 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

Cross post with http://p2p.wrox.com/topic.asp?TOPIC_ID=4928. Please post all replies there.

Take care,


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert SQL to Microsoft Query tgates Excel VBA 0 April 18th, 2008 01:49 PM
Microsoft SQL Server 2005. explore_asp SQL Server 2005 0 August 29th, 2007 03:29 AM
Microsoft SQL isapi extension ERROR - FIX proslambano BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 January 6th, 2007 10:25 AM
Microsoft SQL rowsen BOOK: Beginning SQL 2 May 18th, 2005 02:24 PM
SQL and Microsoft skicrud Beginning PHP 2 October 7th, 2003 09:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.