Ok SQL experts.

I don't want to do this manually. Taking too long. I need to make 2 changes to all the current classified ad tables. This is the script generated by phpmyadmin to do 1, I need to do all of them.

How would I rewrite this to check and change all the ads in the table. I am removing the expiration dates and resetting them from expired to approved.

UPDATE `admin_towtalk`.`modzzz_classified_main` SET `status` = 'approved',
`expiry_date` = '0' WHERE `modzzz_classified_main`.`id` =22;

Can I just remove the 'WHERE' part of the query?

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 28 Jan 2013

 

I don't want to do this manually. Taking too long. I need to make 2 changes to all the current classified ad tables. This is the script generated by phpmyadmin to do 1, I need to do all of them.

How would I rewrite this to check and change all the ads in the table. I am removing the expiration dates and resetting them from expired to approved.

UPDATE `admin_towtalk`.`modzzz_classified_main` SET `status` = 'approved',
`expiry_date` = '0' WHERE `modzzz_classified_main`.`id` =22;

Can I just remove the 'WHERE' part of the query?


Yes

https://www.deanbassett.com
Quote · 28 Jan 2013

UPDATE `admin_towtalk`.`modzzz_classified_main`SET `status` = 'approved',
`expiry_date` = '0'

Quote · 28 Jan 2013

Yup, sometimes it just pays to hang out here.....

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 28 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.