Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in ...
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in...
Yardımlarınızı bekliyorum.
Teşekkürler.
<?php
$a5=mysql_fetch_object(mysql_query("select deger as a from poem_ayar where id='14'"));
$a1=mysql_fetch_object(mysql_query("select deger as a from poem_ayar where id='17'"));
$a2=mysql_fetch_object(mysql_query("select deger as a from poem_ayar where id='18'"));
$ay1=" (( month(post_date)=month(curdate()) and year(post_date)=year(curdate())) or (month(post_date)=month(DATE_SUB( curdate( ) , INTERVAL 1 month )) and year(post_date)=year(DATE_SUB( curdate( ) , INTERVAL 1 month ))))";
$filtre=" where vote>=$a5->a and $ay1 and month(voted)=month(curdate()) and year(voted)=year(curdate()) group by id having count(*)>=$a1->a and sum(vote) >=$a2->a";
$sor="select count(*) as oy,sum(vote) ,id,format((sum(vote)/count(*)),1) as ortalama from poem_gdsr_votes_log $filtre order by (sum(vote)/count(*)) desc,count(*) desc limit 0,15
";
$toplam=ceil(mysql_num_rows(mysql_query($sor))/1);
$s_=mysql_query($sor);
$i=1;
while($s=mysql_fetch_object($s_)){
$ortalama=$s->ortalama*20;
if(get_the_title($s->id)=="")continue;
$posts = wp_get_single_post( $s->id,"ARRAY_A") ;
echo "
<li><b><a href='".get_permalink($s->id)."' class='name'>".get_the_title($s->id)."</a></b></li>
";
}
?>