Solved

query syntax error:(

Posted on 2007-11-17
1
562 Views
Last Modified: 2008-02-01
in all my codes i inserted in all time fields DATE_ADD(LOCALTIME(),INTERVAL 420 minute)

now when i got to the updating...i got an error
mySQLup="UPDATE crmpacks SET update=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='" &pntopic& "', info='" &pninfo& "', price='" &pnprice& "', agentprice='" &pnagentprice& "' WHERE id=" &pupdp




Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 
 
[MySQL][ODBC 3.51 Driver][mysqld-4.1.21-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='11gd', info='222fdf', p' at line
 
can i do this in one update and not update+insert

Open in new window

0
Comment
Question by:sasha85
1 Comment
 
LVL 20

Accepted Solution

by:
steelseth12 earned 500 total points
ID: 20306102
update is a reserved word .... try putting in it in backticks

mySQLup="UPDATE crmpacks SET `update`=DATE_ADD(LOCALTIME(),INTERVAL 420 minute), topic='" &pntopic& "', info='" &pninfo& "', price='" &pnprice& "', agentprice='" &pnagentprice& "' WHERE id=" &pupdp
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question