Ciao Homerbit, si onl lo avevo omesso solo qua...

mi esce
Codice PHP:
string(269"SELECT n.idnw, n.datan, n.foto1, n.titni, n.titne, n.slide, n.onl, e.idev, e.dataev, e.fotoev, e.slide, e.onl
FROM news AS n
INNER JOIN events AS e ON e.dataev = n.datan
WHERE n.slide = 's' and n.onl = 's' and e.slide = 's' and e.onl = 's'
ORDER BY n.datan desc LIMIT 5" 
Il codice completo è questo
Codice PHP:
<?php
    $x 
0;
    
$quern "SELECT n.idn, n.datan, n.imgn, n.titn, n.tite, n.slide, n.onl, e.ide, e.datae, e.imge, e.slide, e.onl
    FROM news AS n
    INNER JOIN events AS e ON e.datae = n.datan
    WHERE n.slide = 's' and n.onl = 's' and e.slide = 's' and e.onl = 's'
    ORDER BY n.data desc LIMIT 5"
;
    
    
$resn MYSQL_QUERY($quern);
    
$x++;
    while (
$rown mysql_fetch_object($resn)) :
        
$tit $rown->titn;
        if (
strlen(strip_tags($tit)) > 23) :
            
$titolo substr(strip_tags($tit), 023)."...";
        else :
            
$titolo strip_tags($tit);
            endif;                                
?>
<a href="news.php?idn=<?php print $rown->idn?>">
    [img]img/news/<?php print $rown->imgn?>[/img]" alt="<?php print $titolo?>" />
</a>
<?php endwhile; ?>
come dicevo non mi restituisce niente..a parte il fatto che in questo modo mi restituirebbe solo 5 immagini news e non eventi..
io invece voglio che le immagini vengano pescate da entrambe le tabelle..
tra le news e tra gli eventi con campo slide e onl = s, ordinate sul join dei campi datan e datae e che puntino alle rispettive pagine come in questo esempio

codice:
<a href="news.php?idn=<?php print $rown->idn; ?>">
    [img]img/news/<?php print $rown->imgn; ?>[/img]" alt="<?php print $titolo; ?>" />
</a>
<a href="eventi.php?ide=<?php print $rown->ide; ?>">
    [img]img/eventi/<?php print $rown->imge; ?>[/img]" alt="<?php print $titolo; ?>" />
</a>
<a href="news.php?idn=<?php print $rown->idn; ?>">
    [img]img/news/<?php print $rown->imgn; ?>[/img]" alt="<?php print $titolo; ?>" />
</a>
<a href="eventi.php?ide=<?php print $rown->ide; ?>">
    [img]img/eventi/<?php print $rown->imge; ?>[/img]" alt="<?php print $titolo; ?>" />
</a>
<a href="news.php?idn=<?php print $rown->idn; ?>">
    [img]img/news/<?php print $rown->imgn; ?>[/img]" alt="<?php print $titolo; ?>" />
</a>