Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
LDDG Posted April 14, 2016 Posted April 14, 2016 Hey guys, Anyone good with mySQL commands and PHP? My server is currently running PHP 5.6.19 and MySQL 5.16.29... I basically need to run a query with the following criteria: UPDATE ipb_core_attachments SET attach_hits = some numeric value (ie. $downloads) WHERE attach_ext = mp3 AND attach_date = LESS THAN 30 DAYS What I find odd is that attach_date is being stored as for example: 1458181690 Is that an Unix stamp? Does anyone know how the query command should be written in order to accomplish the above in PHP and MySQL? I came up with something like this: $Query = "UPDATE ipb_core_attachments SET attach_hits = ".$downloads." WHERE attach_ext = 'mp3' AND attach_date = < 1 MONTH; Bugt not sure if this would work.
Nathan Explosion Posted April 14, 2016 Posted April 14, 2016 https://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_unix-timestamp
Recommended Posts
Archived
This topic is now archived and is closed to further replies.