GetNumRows() mysqli error - Joomla! Forum - community, help and support


hi,

i use follow script make database connection:

code: select all

$db = jfactory::getdbo();
$query='select * #__content_ratectrl content_id='.$articleid;
$db->setquery($query);
$rate=$db->loadobject();
$db->query();

$rate_counter = $db->getnumrows();


now follow error:
warning: mysqli_num_rows() expects parameter 1 mysqli_result, boolean given in.....

how can fix this?

thanks!

n9iels

you need run query before can use loadobject() method.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support