Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 4th, 2005, 06:15 AM
Registered User
 
Join Date: Jul 2005
Location: Bangalore, Karnataka, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Sujit Joshi Send a message via Yahoo to Sujit Joshi
Default UPDATE query is not working

hello all, i'm new to this forum i have bigginner level experience..
i'm using PHP and MS ACCESS database now i'm updating the table in a while loop. but it is giving error like...

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement., SQL state 37000 in SQLExecDirect in c:\apache\htdocs\allocater.php

and my update query is look like this....
$update = "UPDATE allocate3 SET WORKSHEDULE='$work',TIME='$now_date' WHERE auto_id='$id'";
$sql_result = odbc_exec($conn,$update);

what may be the problem please help me regarding this????
Reply With Quote
  #2 (permalink)  
Old July 6th, 2005, 04:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

This is how it should look. Do a echo $update just after this red line, and see what it contains.
Code:
$update = "UPDATE allocate3 SET WORKSHEDULE='" . $work . "',TIME='" . $now_date . "' WHERE auto_id='" . $id . "'";
$sql_result = odbc_exec($conn,$update);
Hope that helps.

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DetailsView update not working. Andrew.Berry ASP.NET 2.0 Professional 6 April 22nd, 2008 11:23 AM
I solved insert query.now see this Update Query. amit_mande@yahoo.com VB.NET 2002/2003 Basics 2 September 21st, 2006 12:48 AM
Update Query Not Working Odifius BOOK: Beginning Access VBA 0 September 20th, 2006 11:33 AM
Update Code Not Working Odifius BOOK: Beginning Access VBA 0 September 19th, 2006 04:04 PM
Update not working... comicghozt ASP.NET 1.0 and 1.1 Basics 3 June 30th, 2006 03:28 AM



All times are GMT -4. The time now is 09:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.