TITOLO Tabelle temporanee in PHP
OGGETTO Tabelle temporanee
Esempio di come creare una tabella temporanea in PHP/MySql:

mysql_query("create temporary table temp SELECT a.id_cliente AS idc, i.id_cliente AS idi FROM anagrafica a, tipo_cliente t, indirizzi i WHERE a.tipo_cliente = t.id_tipo AND (a.id_cliente = i.id_cliente OR a.id_cliente != i.id_cliente) GROUP BY a.id_cliente LIMIT 0,20");

$query="SELECT * FROM temp";

$res=mysql_db_query($db,$query,$link);

//$righe=mysql_num_rows($res);

//echo $righe;

WHILE($row=mysql_fetch_array($res)){

echo $row[idc]."<br>";

}