$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
WHERE A.ID = $neew
LIMIT 1
",$connection)
or die(mysql_error());
while($data = mysql_fetch_array($get_oppo))
{
$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]; }
?>