Ciao a tutti,
non ho ancora provato il codice di joker06
nel frattempo
questo il codice da me realizzato per la query
Codice PHP:
<?
$sqlmoto = "SELECT prodotti.*,users.id_countries,users.id_user,countries.alpha_2 FROM prodotti
INNER JOIN users
ON prodotti.id_utente = users.id_user
INNER JOIN countries
ON countries.id = users.id_countries
WHERE pubblica='no'";
$resmoto = mysql_query($sqlmoto, $conn);
while ($rowmoto = mysql_fetch_array($resmoto))
{
$id_utente = $rowmoto['id_utente'];
$id_moto = $rowmoto['id_prodotto'];
$marca = $rowmoto['marca'];
$modello = $rowmoto['modello'];
$cartella = $rowmoto['prod_foto01'];
$flag = $rowmoto['alpha_2'];
//echo 'ciao '.$flag;
$pics = opendir('gallery/'.$cartella.'/thumbnails/');
while ($filename = readdir($pics)){
if ($filename != '.' && $filename != '..') {
$path = 'gallery/'.$cartella.'/thumbnails/'.$filename;
list($width, $height) = getimagesize($path);
$immagine= '[img]'.$path.'[/img]';
}
//stampo il risultato
}
}
?>