<?php
require('includes/configure.php');
mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE);
$res = mysql_query("SELECT t1.products_id, t2.categories_id, t3.products_name, t1.products_price, t3.products_description
FROM products AS t1 INNER JOIN products_to_categories AS t2 ON t1.products_id=t2.products_id
INNER JOIN products_description AS t3 ON t1.products_id=t3.products_id
WHERE t1.products_status=1");
while(list($id, $cat_id, $title, $price, $info) = mysql_fetch_row($res)){
    $price = (INTEGER)($price*100);
    $info = preg_replace("/[\r|\n|\t]/"," ",$info);
    $info = preg_replace("/<.*?>/","",$info);
    $info = preg_replace("/\s+/"," ",$info);
    echo $id."\t".$cat_id."\t".$title."\t".$price."\t".$info."\n";
}
?>