$conexao = mysql_connect ("localhost", "juledugo_", ""); $teste = $HTTP_GET_VARS["cod"]; if ($conexao){ mysql_select_db ("juledugo_arquivos", $conexao); $query = " SELECT * FROM noticias order by 'codigo' desc "; $rs = mysql_query($query); if ($rs){ //$a = array_keys($reg); //foreach($a as $x); $cod = 0; $x=0; $xx= 0; while ($reg = mysql_fetch_row($rs)){ $a = array_keys($reg); foreach($a as $x); $a=0; if ($a==0){ $xx = $reg[$a]; } //$x = $xx-1; if ($xx ==$teste){ //while ($reg = mysql_fetch_row($rs)){ for ($a=0; $a<=mysql_fetch_row($rs);$a++){ if ($a==1){ $titulo = $reg[$a]; }elseif ($a==2){ $texto = $reg[$a]; }elseif ($a==3){ $autor = $reg[$a]; }elseif ($a==5){ $data = $reg[$a]; }elseif ($a==6){ $hora = $reg[$a]; ?>
|
|