PhpMyAdmin (on http://www.phpwizard.net") has the capability to export mysql 
table ot CSV, then import the CSV or maybe this will help you too(on small 
tables, otherwise the HTML code is big)
$dump='';
$separator=',';
$the_query="select * from $table;";
$res=mysql_query($the_query);
if ($res){
  $num_rows=mysql_num_rows($res);
  for (;$numrows>=0;$num_rows--){
        $arr=mysq_fetch_assoc($res);
        $line='';
        foreach ($arr as $k => $v){
                $line.=($v.$separator);
        }
        $line=substr($line,0,-strlen($separator));
        $dump.=$line."\n";
  }
}
if ($dump){
        $fd=fopen("{$table}_dump.csv","w+");
        frwite($fd,$dump);
        fclose($fd);
        echo "<pre>\n".$dump."\n</pre>";
}

Hope this helps.


-- 
Andrey Hristov
Web Developer
Icygen Corporation
BUILDING SOLUTIONS
http://www.icygen.com

On Friday 19 October 2001 06:33 am, you wrote:
> Please help me, how to export mysql table to the xls table ?
> Thanks for all
>
>               Roman


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to