Tengo un flash que me arroja a traves de una consulta a MySQL resultados por categorias de un shopping .
en mi localhost, cuando agrego un producto, el flash me muestra cual fue el ultimo agregado.. hasta ahi todo bien.
pero cuando lo subo en linea y agrego el producto, no me lo muestra.
una unica forma es borrando historial y actulizando mas de 5 veces. y no siempre
me funciona.
Código PHP:
<?php
require('../../includes/configure.php');
$conexion = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE, $conexion);
$queEmp = "SELECT DISTINCT
products_description.products_name,
categories_description.categories_name,
categories.parent_id,
products.products_id,
products.products_image,
featured.`status`,
categories_description.categories_id,
featured.products_id,
rating.total_value
FROM
categories
INNER JOIN categories_description ON (categories.categories_id = categories_description.categories_id)
INNER JOIN products_to_categories ON (categories.categories_id = products_to_categories.categories_id)
INNER JOIN products_description ON (products_to_categories.products_id = products_description.products_id)
INNER JOIN products ON (products_to_categories.products_id = products.products_id)
INNER JOIN featured ON (products_to_categories.products_id = featured.products_id),
rating
WHERE
(categories.parent_id LIKE '55') AND
(featured.`status` = '1') AND
(products.products_id = rating.id) AND
(categories.categories_id = '47')
ORDER BY
products_description.products_name";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
header("Content-type: text/xml");
echo '<?xml version="1.0"?>';
echo '<shopping>';
if ($totEmp> 0) {
while ($rowEmp = mysql_fetch_assoc($resEmp)) {
echo '<shopinfo>';
echo "<imagen>".$rowEmp['products_image']."</imagen>";
echo "<categoria>DVD Films</categoria>";
echo "<rating>artist</rating>";
echo "<product>".$rowEmp['products_name']."</product>";
echo "<httptype>./images/</httptype>";
echo "<linkTo>product_info.php?products_id=".$rowEmp['products_id']."</linkTo>";
echo "<linkTarget>top</linkTarget>";
echo '</shopinfo>';
}
}
echo '</shopping>';
?>