$sql="SELECT username, lastname, firstname FROM $tbl_user as user, $tbl_admin as admin WHERE admin.user_id=user.user_id ORDER BY ".$target_name." ASC";
// Check if the user has sent or received the file.
$sql="SELECT * FROM ".$dropbox_cnf["tbl_person"]." WHERE file_id='".Database::escape_string($_GET['id'])."' AND user_id='".Database::escape_string($_user['user_id'])."'";
@ -3614,7 +3614,7 @@ function set_notification($content,$id, $add_only = false) {
// first we check if the notification is already set for this
$sql = "SELECT * FROM $table_notification WHERE $database_field = '".Database::escape_string($id)."' AND user_id = '".Database::escape_string($_user['user_id'])."'";
// if the user did not indicate that (s)he wanted to be notified already then we store the notification request (to prevent double notification requests)
$sql = "SELECT * FROM $table_class WHERE name='".Database::escape_string($name)."'";
$res = Database::query($sql, __FILE__, __LINE__);
return mysql_num_rows($res) != 0;
return Database::num_rows($res) != 0;
}
/**
* Delete a class
@ -153,7 +153,7 @@ class ClassManager
$course_codes[] = $course['course_code'];
$sql = "SELECT DISTINCT user_id FROM $table_class_user t1, $table_course_class t2 WHERE t1.class_id=t2.class_id AND course_code = '".$course['course_code']."' AND user_id = $user_id AND t2.class_id<>'$class_id'";
$sql = "SELECT * FROM $tbl_class_user WHERE class_id = '".Database::escape_string($class_id)."' AND user_id = '".Database::escape_string($single_class_user->user_id)."'";
$res = Database::query($sql, __FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
if (Database::num_rows($res) > 0)
{
if (CourseManager :: get_user_in_course_status($single_class_user->user_id, $course_code) == STUDENT)
@ -63,7 +63,7 @@ if (isset($workWith)) // explicit in URL, or selected at bottom of screen
$sql = "SELECT id FROM $scormdocument WHERE path='". Database::escape_string(api_substr($workWith,1)) . "' OR path='". Database::escape_string(substr($workWith,1)) . "/.'";
// showing the links that are in the root (having no category)
$sql = "SELECT * FROM ".$link_table.", ".$item_property_table." WHERE (category_id=0 or category_id IS NULL) AND tool = '".TOOL_LINK."' AND id=ref AND visibility='1'";
// showing the links that are in the root (having no category)
$sql = "SELECT * FROM ".$link_table.", ".$item_property_table." WHERE (category_id=0 or category_id IS NULL) AND tool = '".TOOL_LINK."' AND id=ref AND visibility='1'";