Re: Vote once with Status: ON / OFF feature
Posted: Wed Oct 19, 2011 12:01 am
You don't mention where you placed the code; here is where i would place it
Code: Select all
<?php
// 'id' should be some unique key, i use the primary key of the table usually.
$countSql = "SELECT COUNT(id) FROM table";
$countQry = mysql_query($countSql);
$countAry = mysql_fetch_array($countQry);
$rows = $countAry[0];
if ($rows == 0) {
$title = 'There are no song on the list.<br/>Please wait the current DJ to approve your Song Request.<br/>Thank you!';
echo $title;
}
else {
// the first block of code pasted will go inside the else statement
}
?>