I pat the farm, the class $ db is used, I can’t stupidly execute the query inside the loop, the data is interrupted by the query inside while
<? $db->Query("SELECT * FROM db_task WHERE moder = '1' AND kol_z >= 1 $catt ORDER BY up_date DESC"); while($task = $db->FetchArray()) { $db->Query("SELECT id FROM db_task_user WHERE id_task = '$task[id]' LIMIT 1"); // эта штука перебивает похоже $db и выводит пустоту, на самом деле данные есть if($db->NumRows() == 0) {//если это и строку выше закомментить, всё норм ?> Norm<br> <? } } ?>
<? ?>
<? ?>
- Naumov(B.task_user = 1 OR B.task_user is null)
that all records would be. The same applies to the status field, which also needs to be checked for NULL. Or, generally, transfer the condition to ON:select * from db_task A left join db_task_user B on B.id_task=A.id and B.task_user = 1 and B.status<>1
- Mike