Yesterday, after long period of API testing, new version was submitted gor review, the most important changes: trakt.tv synchronization switched to our own API – currently only for […]
MySQL / PHP
Posted on:
How to use MySQL to search in php serialized fields
Well, first rule – you should not do this. But if there is good reason, consider using such query for searching in index-based arrays: SELECT * FROM table […]
MySQL
Posted on:
Quick tip – how to generate MySQL random date/time in given range?
Just use: SELECT DATE_FORMAT( FROM_UNIXTIME( RAND() * (UNIX_TIMESTAMP(‘2012-11-13 16:00:00’) – UNIX_TIMESTAMP(‘2012-11-13 23:00:00’)) + UNIX_TIMESTAMP(‘2012-11-13 23:00:00’) ), ‘%Y-%m-%d %H:%i:%s’) where first param UNIX_TIMESTAMP(‘2012-11-13 16:00:00’) is start value, second UNIX_TIMESTAMP(‘2012-11-13 23:00:00’) is […]