it works fine inside the mysql, but the answer is here:
$query = "
DROP TABLE IF EXISTS tmp_table;
CREATE TEMPORARY TABLE tmp_table (mjgod VARCHAR(20)) TYPE=HEAP;
INSERT INTO tmp_table SELECT DATE_FORMAT(max(time), \'%M, %Y\') FROM clanci;
SELECT clanci.*, tmp_table.* as najnoviji from clanci, tmp_table WHERE DATE_FORMAT(clanci.time,\'%M, %Y\')=tmp_table.mjgod;
";
$result = mysql_query($query, $link) or die("No results for bulletin.");
The only problem is that this code works inside mysql prompt, but when I try to execute multiple SQL statement string (above) from PHP it returns no results.
Does anybody know is it possible to execute some kind of SQL procedure like above one from PHP?