Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need help on SQL update statement


nttcar

Recommended Posts

I need to quick update the products_price

 

when I run the sql from phpadmin, I got below error

 

SQL query:

 

udpate product SET products_price = products_price +10

 

MySQL said:

 

#1064 - 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 'udpate product set products_price = products_price + 10' at line 1

Link to comment
Share on other sites

I need to quick update the products_price

 

when I run the sql from phpadmin, I got below error

 

SQL query:

 

udpate product SET products_price = products_price +10

 

MySQL said:

 

#1064 - 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 'udpate product set products_price = products_price + 10' at line 1

 

Well using a table that exists would be a good start.

 

The table is products not product

Link to comment
Share on other sites

Well using a table that exists would be a good start.

 

 

I notice that and correct it and got same result

 

The table is products not product

udpate products SET `products_price` = `products_price` +10

 

MySQL said:

 

#1064 - 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 'udpate products set `products_price` = `products_price` + 10' at line 1

Link to comment
Share on other sites

udpate products SET `products_price` = `products_price` +10

 

MySQL said:

 

#1064 - 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 'udpate products set `products_price` = `products_price` + 10' at line 1

 

 

Finall I got it, update need to be in UPPER case

Link to comment
Share on other sites

Finall I got it, update need to be in UPPER case

 

No it doesn't

Link to comment
Share on other sites

I need to quick update the products_price

 

when I run the sql from phpadmin, I got below error

 

SQL query:

 

udpate product SET products_price = products_price +10

 

MySQL said:

 

#1064 - 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 'udpate product set products_price = products_price + 10' at line 1

 

On the off change that you copy/pasted this verbatim from your system, you spelled the word "update" wrong...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...