Snippets

mason.malone How to check when a URL was last accessed

Created by mason.malone
masonm:core/ (master✗) $ ssh officebackup                                                                                                                                                                             -- INSERT -- [12:59:58]
Last login: Thu May 19 11:45:27 2016 from 192.168.100.192
[masonm@officebackup ~]$ sudo mysql identity_production
[sudo] password for masonm: 

mysql> desc urls;
+---------------------+------------------+------+-----+---------+----------------+
| Field               | Type             | Null | Key | Default | Extra          |
+---------------------+------------------+------+-----+---------+----------------+
| id                  | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| url                 | varchar(255)     | NO   |     | NULL    |                |
| external            | tinyint(1)       | NO   |     | 0       |                |
| first_access        | datetime         | NO   |     | NULL    |                |
| last_access         | datetime         | NO   |     | NULL    |                |
| last_status         | int(11)          | YES  |     | NULL    |                |
| scope_expression_id | int(10) unsigned | YES  | MUL | NULL    |                |
| host_id             | int(11)          | YES  | MUL | NULL    |                |
+---------------------+------------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)

mysql> select * from urls where url like '%TemporaryReport%';
+---------+-----------------------------------------------------+----------+---------------------+---------------------+-------------+---------------------+---------+
| id      | url                                                 | external | first_access        | last_access         | last_status | scope_expression_id | host_id |
+---------+-----------------------------------------------------+----------+---------------------+---------------------+-------------+---------------------+---------+
| 2332087 | /controllers/reports/TemporaryReportsController.php |        0 | 2010-01-15 11:16:58 | 2011-01-29 12:50:21 |        NULL |                   0 |   42555 |
| 2332088 | /controllers/report/TemporaryReportsController.php  |        0 | 2010-01-15 11:17:06 | 2011-01-29 12:50:38 |        NULL |                   0 |   42555 |
+---------+-----------------------------------------------------+----------+---------------------+---------------------+-------------+---------------------+---------+

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.