Consulta Mysql
ae to com essa pala ae, isso ta dando na versao 4 na versao 5 ta ok!
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/local/apache/sites/www.iesgo.edu.br/2008/admin/conteudo/cmd/Pesquisar.php on line 22
<?php
/*
* Created on 26/11/2007
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$query = "SELECT * FROM ffc_conteudo ";
if(count($arrayAtribute) > 0) {
$query .= " WHERE ";
foreach($arrayAtribute as $item) {
$query .= $item->getCampo()."='".$item->getValue()."'";
}
}
$query .= "order by id_conteudo desc";
//print $query;
$res = mysql_query($query, $link);
$arrayEntity = Array();
while($obj = mysql_fetch_object($res)) { <b>// LINHA 22</b>
$entity = new ConteudoEntity();
$entity->setId_conteudo($obj->id_conteudo);
$entity->setId_tipo($obj->id_tipo);
$entity->setId_usuario($obj->id_usuario);
$entity->setId_imagem($obj->id_imagem);
$entity->setDe_titulo($obj->de_titulo);
$entity->setDe_resumo($obj->de_resumo);
$entity->setDe_conteudo($obj->de_conteudo);
$entity->setDe_fonte($obj->de_fonte);
$entity->setDe_url($obj->de_url);
$entity->setDh_inicio($obj->dh_inicio);
$entity->setDh_fim($obj->dh_fim);
array_push($arrayEntity, $entity);
}
include_once("lista_conteudo.php");
?>
valeu
Discussão (5)
Carregando comentários...