|
| Here is the PHP code
<?php
header("Content-type: text/xml");
header("Encoding: utf-8");
//Developed by -==[Mihir Shah]==- during my Project work
//for the output
//to create connection to database
$connection = mysql_connect("localhost","username", "password")
or die ("could not connect to database");
//to select the database here test is the sample database come with mysql
$db = mysql_select_db("database",$connection)
or die ("Couldn't select database.");
$rs = mysql_query("select id, company, address, name, postalc, city,
country, code from docu_request where behandeld='0'",$connection)
or die ("invalid query");
//count the no. of columns in the table
$fcount = mysql_num_fields($rs);
//you can choose any name for the starting tag
echo ("<result>");
while($row = mysql_fetch_array( $rs ) )
{
echo ("<tablerow>");
for($i=0; $i< $fcount; $i++)
{
$tag = mysql_field_name( $rs, $i );
echo ("<$tag>".htmlspecialchars($row[$i]). "</$tag>");
}
echo ("</tablerow>");
}
echo ("</result>");
?>
"Joe Fawcett" wrote:
> "Clee" <Clee@discussions.microsoft.com> wrote in message
> news:33004892-DA52-4B1D-A0BB-007A336CCA79@microsoft.com...
> Well it sounds as if it isn't.
> Show us how you produce it.
>
> --
>
> Joe
>
>
>
|
|