Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/05/2007, 13:51
PANAFLAKIN
 
Fecha de Ingreso: septiembre-2004
Ubicación: Chihuahua Mex
Mensajes: 404
Antigüedad: 19 años, 7 meses
Puntos: 2
Probelma con Query

Bueno tengo un problema con la siguientre query

Código HTML:
function getLatestReviewsAndPreviews($numArticles = '1') {
$sql = "SELECT
gamecms_article.articleId,
gamecms_article.title,
gamecms_system.systemAbbrev,
gamecms_category.category
FROM
gamecms_article
LEFT JOIN
gamecms_category
ON
gamecms_article.categoryId = gamecms_category.categoryId
LEFT JOIN
gamecms_articleSystemLink
ON
gamecms_article.articleId = gamecms_articleSystemLink.articleId
LEFT JOIN
gamecms_system
ON
gamecms_articleSystemLink.systemId = gamecms_system.systemId
WHERE
(gamecms_category.category = 'Reviews' OR gamecms_category.category = 'Previews' OR gamecms_category.category = 'Articles')
AND
gamecms_article.auth='1'
AND
gamecms_article.deleted='0'
ORDER BY
gamecms_article.timestamp
DESC";
if ($numArticles != '*') {
$sql = $sql." LIMIT 0, ".$numArticles;
}
$this->db->query($sql);
while($this->db->next_record()) {
$articleId = $this->db->f("articleId");
$title = $this->db->f("title");
if ($this->db->f("category") == 'Reviews') {
include "./templates/latestReviews.tpl.php";
} elseif ($this->db->f("category") == 'Articles') {
include "./templates/latestArticles.tpl.php"; } else {
include "./templates/latestPreviews.tpl.php";
}
}
}
Es una funcion la cual obtiene una lista de la tabla de articulos, de 3 diferentes categorias y la cual tiene su propio template pero no s eporque no aparecen los ARticles, agradesco cualquier ayuda

Saludos