SELECT id FROM `table` WHERE FIND_IN_SET('слово', tags)
var xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function() {
console.log(xhr.response);
var img = document.getElementById('img');
var url = window.URL || window.webkitURL;
img.src = url.createObjectURL(xhr.response);
}
xhr.open('GET', 'http://pp.vk.me/c608129/v608129926/13d7/M78M4KmekWI.jpg', true);
xhr.send();
SELECT ads.id,
(SELECT COUNT(*) FROM `clicks` WHERE ad_id = ads.id AND DATE(created_at) = '2014-02-24' AND
DATE(created_at) = '2014-02-24') AS clicks,
(SELECT COUNT(*) FROM `shows` WHERE ad_id = ads.id AND DATE(created_at) = '2014-02-24' AND
DATE(created_at) = '2014-02-24') AS shows
FROM ads
WHERE ads.id = 35;