| |
while ($row = mysql_fetch_row($query))
{
$texto1=$row[2];
$foto=$row[3];
$texto2 = str_replace("\r\n"," ",$texto1);
//replace(texto1,chr(10)," ","all");
echo "| $row[1] | ";
echo "| | ";
echo " | ";
echo "| | ";
echo "$texto2 | ";
}
?>
| |
|
|
|
|
$idnoticia=$HTTP_GET_VARS["idnoticia"];
//Conexion con la base
$link =mysql_connect("localhost","root","");
if (!$link) {
echo "Could not connect". mysql_error();
}
//selección de la base de datos con la que vamos a trabajar
$db_selected = mysql_select_db("economia");
if (!$db_selected) {
echo "Can\'t use database:" . mysql_error();
}
//Ejecucion de la sentencia SQL
$query= mysql_query("select idnoticia,titulo,fecha from noticias order by fecha desc ");
if (!$query) {
echo "Can\'t use query:" . mysql_error();
}
while ($row = mysql_fetch_row($query)){
echo "";
echo "| • | ";
echo "$row[1] [$row[2]] | \n";
echo " \n";
}
?>
|