Jump to content

MySQL/PHP help


Recommended Posts

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.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...