Jump to content
pafranklin

SQL Command Error

Recommended Posts

Hi all,

 

I've uploaded some products to my site and then started to make amendments. I've then spotted the date available is incorrect. Therefore I am trying to select products added today 11th December and updating all of them to be available on 10th February 2019.

I have this so far but pretty sure this is not correct?!

UPDATE `products_date_available`= `2019-02-10 00:00:00` FROM `products` WHERE `products_date_added` = `2018-12-12 00:00:00`

Please would someone be kind enough to correct this or tell me where I am going wrong?

Many thanks.

Paul

 


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites

Duh, got there in the end so just in case anyone else ever looks for something like this its as follows:

UPDATE `products` SET `products_date_available` = '2019-02-10' WHERE `products_date_added` = '2018-12-11'

Paul


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×