Solved

query syntax error:(

Posted on 2007-11-17
1
558 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using in clause in query with many values 7 44
Query Peformance + mulitple query plans 9 47
xampp tool 12 23
email about the whoisactive result 7 21
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now