Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/06/2010, 18:39
Avatar de jolie_girl
jolie_girl
 
Fecha de Ingreso: agosto-2008
Ubicación: mexico
Mensajes: 346
Antigüedad: 15 años, 8 meses
Puntos: 10
Exclamación creando rss feed dinamico con php el xml !!!

tengo mi codigo:


<?php

require_once('../Connections/conexion.php');

mysql_select_db($database_conexion, $conexion);

$query_rsArticulo= "select d1_titulo from tabladenomina order by d1_num desc";
$rsArticulo = mysql_query($query_rsArticulo, $conexion) or die (mysql_error());
$row_rsArticulo = mysql_fetch_array($rsArticulo);
$totalRows_rsArticulo= mysql_num_rows($rsArticulo);

$pg_titulo ="Programacion Web";
$pg_link = "http://www.programacionweb.net";
$pg_descripcion = "Ayuda al webmaster con artículos especializados en programacion web";
$pg_idioma = "es";
?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="0.91">


<channel>
<title>Euroresidentes</title>
<link>http://www.euroresidentes.com</link>
<description>servicios residentes europeos</description>
<language>es-ES</language>

<image>
<title>Spain</title>
<url>http://www.euroresidentes.com/logo.gif</url>
<link>http://www.euroresidentes.com</link>
<width>100</width>
<height>12</height>
</image>

<?php if($totalRows_rsArticulo > 0){
do {


?>
<item>
<title><?php echo $row_rsArticulo['d1_titulo']; ?></title>
<link>lalala</link>
<description>asd
</description>
</item>
<?php } while ($row_rsArticulo = mysql_fetch_array($query_rsArticulo));
} ?>

</channel>
</rss>



me tira este error en el codigo fuente y solo se ve el primer registro
mysql_fetch_array() expects parameter 1 to be resource, string given in <


si me saca bien el rss pero nadamas me pone un registro, hay un error en:
while ($row_rsArticulo = mysql_fetch_array($query_rsArticulo));


pero segun yo esta bien!!!!! ya me desespere sera que ver con xml o que?
__________________
Solicito colaboradoras para proyecto social media largo plazo. Manda mp