Solved

query syntax error:(

Posted on 2007-11-17
1
565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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