usa mysql_error() per vedere se ti restituisce un errore:
$sel_layout_vicino = mysql_query("SELECT id,nome,top,lefty,width, (lefty+width) as totale from inventive_layout where nome ='layout' and id != '".$layout['id']."' and top <= '".$layout['top']."' and ((
lefty >= '".$layout['lefty']."' and lefty <= '".($layout['lefty']+$layout['width'])."')|| (lefty <= '".$layout['lefty']."' and totale >= '".$layout['lefty']."' )) order by top DESC") or die (mysql_error());

Rispondi quotando