If elseif kontrollerinden kaynaklaniyor gibi elseif kullanma
Samsung Galaxy S3 tapatalk 2 ile gonderildi.
Yazim yanlislari varsa affola.
elseif kullanmasam da aynı sorun devam ediyor.
kod bloğu içindeki fonksiyonlar
## Vote ##
function getAllVotes($id)
{
$votes = array();
$q = "SELECT * FROM comments WHERE id = $id";
$r = mysql_query($q);
if(mysql_num_rows($r)==1)
{
$row = mysql_fetch_assoc($r);
$votes[0] = $row['votes_up'];
$votes[1] = $row['votes_down'];
}
return $votes;
}
function getEffectiveVotes($id)
{
$votes = getAllVotes($id);
$effectiveVote = $votes[0]." Like, ".$votes[1]." Dislike";
return $effectiveVote;
}
## Vote ##