function count_rows add WHERE c_id = ".api_get_course_int_id()

skala
Hubert Borderiou 14 years ago
parent b021141882
commit fedbf05cf2
  1. 2
      main/inc/lib/database.lib.php

@ -378,7 +378,7 @@ class Database {
* @return int The number of rows in the given table.
*/
public static function count_rows($table) {
$obj = self::fetch_object(self::query("SELECT COUNT(*) AS n FROM $table"));
$obj = self::fetch_object(self::query("SELECT COUNT(*) AS n FROM $table WHERE c_id = ".api_get_course_int_id())); //
return $obj->n;
}

Loading…
Cancel
Save