[svn r12322] Added check on input param to get_interactions_count_from_db()

skala
Yannick Warnier 18 years ago
parent d5113b1aa1
commit 5d4956e84d
  1. 1
      main/newscorm/learnpath.class.php

@ -2047,6 +2047,7 @@ class learnpath {
* @return integer Number of interactions
*/
function get_interactions_count_from_db($lp_iv_id=0){
if(empty($lp_iv_id)){return -1;}
$table = Database::get_course_table('lp_iv_interaction');
$sql = "SELECT count(*) FROM $table WHERE lp_iv_id = $lp_iv_id";
$res = api_sql_query($sql,__FILE__,__LINE__);

Loading…
Cancel
Save