Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Thursday, September 1, 2016

pwo/grs - cloudfront invalidation for S3 video; mysql REPLACE



cloudfront invalidation is sort of a pain in the ass.
easier to just use a new name.
even though that means doing a replace in mysql for the video content id

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#Invalidation_Requests

UPDATE grs_requirements
SET content_id = REPLACE(content_id, 'vtpp/', 'vtpp4/')
WHERE req_type = 'video'


Wednesday, September 30, 2015

pwo sql to examine quizzes in progress (ungraded, unexpired)


SELECT * FROM `quizzes` WHERE (has_been_graded = 0 AND mode = 'quiz' AND expiretime > NOW())

SELECT * FROM `quizzes` WHERE (has_been_graded = 0 AND expiretime > NOW())