TUTTE LE NEWS DEL DOWNTOWNBASKETBALL
//includo La funzione per formattare le news a tot caratteri function tagliaStringa($testo) {$maxCaratteri = 252; $caratteri = strlen($testo); if($caratteri > $maxCaratteri) {return substr($testo, 0, $maxCaratteri)." .....";} else {return $testo;} } $get_oppo = mysql_query(" SELECT A.*, A.post_content AS news, DATE_FORMAT(A.post_date, '%d-%m-%Y') AS dat FROM dt_posts A, dt_terms B, dt_term_relationships C, dt_term_taxonomy D WHERE A.post_status LIKE 'publish' AND A.ID = C.object_id AND C.term_taxonomy_id = D.term_taxonomy_id AND D.term_id = B.term_id ORDER BY A.ID DESC LIMIT 10 ",$connection) or die(mysql_error()); $i=1; while($data = mysql_fetch_array($get_oppo)) { $dataa = $data[dat]; $news = stripslashes(TagliaStringa($data[news], 100)); $link = str_replace('/wordpress/?p=', '/news.php?n=', $data[guid]); $get_inta = mysql_query(" SELECT guid AS foto FROM dt_posts WHERE post_parent LIKE '$data[ID]' AND post_type = 'attachment' LIMIT 1 ",$connection) or die(mysql_error()); while($idata = mysql_fetch_array($get_inta)) { $fotonews = $idata[foto]; } ?>
" style="height:200px; float: left; margin: 1px 15px 15px 15px;" />
echo $data[post_title]; ?>
echo $dataa; ?>
echo $news; ?>
$i = ($i + 1); } ?> include('footerN.php'); ?>