Created
June 15, 2009 19:46
-
-
Save vestel/130289 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$res_pass = mysql_query("START TRANSACTION",$userconnect); | |
$res_correct = mysql_query($correct,$userconnect); | |
$correctanswer = array(); | |
while ($row = mysql_fetch_row($res_correct)) { | |
$correctanswer[] = $row; // Заполняем массив правильных ответов | |
} | |
$saved = json_encode($correctanswer); | |
$res_pass = mysql_query("ROLLBACK",$userconnect); //Откат на точку возврата | |
$res_answer = mysql_query($useranswer,$userconnect); | |
if ($check != "") { // Если запроса проверки нет, то проверяем по результату пользовательского запроса | |
$res_answer = mysql_query($check,$userconnect); // Если запрос проверки есть, то проверяем по нему | |
} | |
$useranswers = array(); // отсылаем запрос пользователя к своей базе | |
while ($row = mysql_fetch_row($res_answer)) { | |
$useranswers[] = $row; // Заполняем массив пользовательских ответов | |
} | |
$usered = json_encode($useranswers); | |
if ($usered != $saved) { //ERROR } | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment