Solved

query syntax error:(

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

11 Experts available now in Live!

Get 1:1 Help Now