Tengo un problema al utilizar la clase [URL="http://templatepower.codocad.com"]TemplatePower[/URL]
Mi error es el siguiente:
Código:
Mi codigo es el siguiente:Fatal error: Call to a member function size() on a non-object in /opt/lampp/htdocs/template/TPexamples/simple_example.php on line 44
Código PHP:
$ssql = "select * from blog";
$productos = mysql_query($ssql);
while ($fila=mysql_fetch_object($productos)){
$cat = "select * from blog_cats WHERE cat_id=$fila->cat_id";
$cats = mysql_query($cat);
$row = mysql_fetch_array($cats);
$comment = "select * from blog_comments WHERE post_id=$fila->post_id";
$comments = mysql_query($comment);
$row2 = mysql_fetch_array($comments);
$t->newBlock("main");
$t->assign(array(
titulo => $fila->post_title,
id => $fila->post_id,
content => $fila->post_content,
day => date("l m y",$fila->post_date),
cat => $row["cat_name"],
coment => $comments->size()
));
}
Código PHP:
coment => $comments->size()