MySQL Forums
Forum List  »  PHP

Problem with an if with in an if
Posted by: Omar Rozo
Date: April 10, 2014 05:53AM

Hi all im new at this and I need some guidance, I would like to get the total number of saved items and if its equal or more than 10 then not allow to save, here is my code:

if ($save == "true"){
$sqlSave = mysql_query("SELECT * FROM regis WHERE Fun_Id = $fun and Save = 1");
$result_sqlSave = mysql_num_rows($sqlSave);
if ($result_sqlSave >= 9 ){
$save = "0";
}
}else{
$save = "1";
}

Options: ReplyQuote


Subject
Written By
Posted
Problem with an if with in an if
April 10, 2014 05:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.