function memory($user,$ayat){
sqlconnection();
$user = mysql_real_escape_string($user);
$ayat = mysql_real_escape_string($ayat);
if((checkmemory($user,$ayat)==0) || !(checkmemory($user,$ayat)==0)){
$sql="INSERT INTO `mark` (
`user_id` ,
`ayat`
)
VALUES (
'".$user."', '".$ayat."'
)";
mysql_query($sql);
return $sql;
}
}
function checkmemory($user,$ayat){
sqlconnection();
$user = mysql_real_escape_string($user);
$ayat = mysql_real_escape_string($ayat);
$sqlmemory="SELECT *
FROM `mark`
WHERE `user_id` = '".$user."'
AND `ayat` =".$ayat;
$sqlmemoryresult=mysql_num_rows(mysql_query($sqlmemory));
return $sqlmemoryresult;
}
http://localhost/quran/index.php?link=mark&totalayat=30 this link is not working.
I mean when totalayat is 10,20,30,40,50,60 then its not working. But other value say 5,8,26,65 is working well. What is the problem?