Making php to make xml file with mysql query results.
| From: | Juan Stiller | Date: | Fri, 22 Oct 2004 20:18:04 +0000 |
| Subject: | Making php to make xml file with mysql query results. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36988@lists.php.net to get a copy of this message | ||
Ok guys, after reading some tutorials, and seraching
flash mailing lists, i don´t remember if someone here
recommend me it too, i need to make php to insert a
mysql query results on an xml file. I don´t have a
clue how to do that, can anyone help me with this?
This is the php content that sends mysql query and get
the result.
<?php
$conn = @mysql_connect("***", "***", "***");
if (!$conn) {
echo( "<P>No se pudo conectar " .
"al servidor MySQL.</P>" );
exit();
}
if (! @mysql_select_db("clientes") ) {
echo( "<P>No se puede encontrar " .
"la base de datos clientes!</P>" );
exit();
}
// Request all data
$result1 = mysql_query("select * from
clientesnuevos");
print "Results=";
echo "<h1>Clientes agregados:</h1><br>";
while($row=mysql_fetch_array($result1, MYSQL_ASSOC))
{
echo "&Id={$row['id']}";
echo "&Apellido={$row['apellidoclientesnuevos']}";
echo "&Nombre={$row['nombreclientesnuevos']}";
echo "&Dni={$row['dniclientesnuevos']}";
echo "&Telefono={$row['telefonoclientesnuevos']}";
echo "&Dia={$row['diacitaclientesnuevos']}";
echo "&Mes={$row['mescitaclientesnuevos']}";
echo "&Ano={$row['anocitaclientesnuevos']}";
echo "&Hora={$row['horacitaclientesnuevos']}";
echo "&Minutos={$row['minutoscitaclientesnuevos']}";
echo "&Abogado={$row['abogadoclientesnuevos']}";
echo "&Nombre={$row['nombreclientesnuevos']}";
echo "&Asunto={$row['asuntoclientesnuevos']}";
echo "&Donde={$row['dondeclientesnuevos']}";
}
mysql_free_result($result1);
?>
So what do i have to change to insert this results on
an xml file.
Correo Yahoo! - 6 MB, tecnología antispam ¡gratis!
Suscribite ya http://correo.yahoo.com.ar/