wordpress - sql query - pages table - update all publish dates with a random

On wordpress 3.8

on the pages table

What sql query will...

update all publish dates with a random date between two

dates  



P.S.

I have 10 questions, highest point level - open about sql queries

Soo, Lots of points for an sql guy
Matt_Walker01Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ZberteocConnect With a Mentor Commented:
Try this:
UPDATE your_table SET 
	your_date_field = 
		case FLOOR(RAND() * (2)) + 1
			when 1 then 'date1'
			when 2 then 'date2'
		end
WHERE <condition_here>

Open in new window

0
All Courses

From novice to tech pro — start learning today.