QString::fromUtf8
.$sql = "SELECT COUNT(*) FROM `categlist` WHERE `Code`=?"; # use bind!
set @id=UUID();
insert into categlist(id, <col2>) values (@id, 'another value');
select @id;
$.get(script).done(function(data) {
$('<script></script>').html(data).appendTo('body');
});
$.get(stylesheet).done(function(data) {
$('<style type="text/css"></style>').html(data).appendTo('body');
});
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS thedate, MAX(count) FROM analytics WHERE DATE(FROM_UNIXTIME(CURRENT_TIMESTAMP)) = DATE(FROM_UNIXTIME(`created_at`)) GROUP BY DATE(FROM_UNIXTIME(`created_at`))
UNION ALL
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS thedate, MAX(count) FROM analytics WHERE DATE(FROM_UNIXTIME(CURRENT_TIMESTAMP - day)) = DATE(FROM_UNIXTIME(`created_at`)) GROUP BY DATE(FROM_UNIXTIME(`created_at`))
UNION ALL
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS thedate, MAX(count) FROM analytics WHERE DATE(FROM_UNIXTIME(CURRENT_TIMESTAMP - 2days)) = DATE(FROM_UNIXTIME(`created_at`)) GROUP BY DATE(FROM_UNIXTIME(`created_at`))
UNION ALL
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS thedate, MAX(count) FROM analytics WHERE DATE(FROM_UNIXTIME(CURRENT_TIMESTAMP - 3days)) = DATE(FROM_UNIXTIME(`created_at`)) GROUP BY DATE(FROM_UNIXTIME(`created_at`))
UNION ALL
SELECT DATE(FROM_UNIXTIME(`created_at`)) AS thedate, MAX(count) FROM analytics WHERE DATE(FROM_UNIXTIME(CURRENT_TIMESTAMP - 4days)) = DATE(FROM_UNIXTIME(`created_at`)) GROUP BY DATE(FROM_UNIXTIME(`created_at`))