Skip to content
Snippets Groups Projects
Commit 35886ecf authored by User expired's avatar User expired
Browse files

corrected a data type error for sql select

parent 85071bb5
No related branches found
No related tags found
1 merge request!3160210 ip4
......@@ -1279,7 +1279,7 @@ function F_getTestIDs($test_id, $user_id, $filter='test_results_to_users') {
$str = '0'; // string to return
$test_id = intval($test_id);
$user_id = intval($user_id);
$sql = 'SELECT test_id FROM '.K_TABLE_TESTS.' WHERE test_id IN (SELECT DISTINCT testuser_test_id FROM '.K_TABLE_TEST_USER.' WHERE testuser_user_id='.intval($user_id).' AND testuser_status>0) AND '.$filter.'=1';
$sql = 'SELECT test_id FROM '.K_TABLE_TESTS.' WHERE test_id IN (SELECT DISTINCT testuser_test_id FROM '.K_TABLE_TEST_USER.' WHERE testuser_user_id='.intval($user_id).' AND testuser_status>0) AND '.$filter.'= TRUE';
if ($r = F_db_query($sql, $db)) {
while ($m = F_db_fetch_assoc($r)) {
$str .= ','.$m['test_id'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment