@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | $sql = "SELECT MAX(description_type) as MAX |
| 177 | 177 | FROM $tbl_course_description |
| 178 | - WHERE c_id = $course_id AND session_id='" . $this->session_id . "'"; |
|
| 178 | + WHERE c_id = $course_id AND session_id='".$this->session_id."'"; |
|
| 179 | 179 | $rs = Database::query($sql); |
| 180 | 180 | $max = Database::fetch_array($rs); |
| 181 | 181 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | 'session_id' => $this->session_id |
| 217 | 217 | ]; |
| 218 | 218 | |
| 219 | - $last_id = Database::insert($table, $params); |
|
| 219 | + $last_id = Database::insert($table, $params); |
|
| 220 | 220 | |
| 221 | 221 | if ($last_id > 0) { |
| 222 | 222 | $sql = "UPDATE $table SET id = iid WHERE iid = $last_id"; |
@@ -324,8 +324,8 @@ discard block |
||
| 324 | 324 | $sql = "DELETE FROM $tbl_course_description |
| 325 | 325 | WHERE |
| 326 | 326 | c_id = $course_id AND |
| 327 | - id = '" . intval($this->id) . "' AND |
|
| 328 | - session_id = '" . intval($this->session_id) . "'"; |
|
| 327 | + id = '".intval($this->id)."' AND |
|
| 328 | + session_id = '" . intval($this->session_id)."'"; |
|
| 329 | 329 | $result = Database::query($sql); |
| 330 | 330 | $affected_rows = Database::affected_rows($result); |
| 331 | 331 | if ($this->id > 0) { |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $course_id = api_get_course_int_id(); |
| 355 | 355 | |
| 356 | 356 | $sql = "SELECT id FROM $tbl_course_description |
| 357 | - WHERE c_id = $course_id AND description_type = '" . intval($description_type) . "'"; |
|
| 357 | + WHERE c_id = $course_id AND description_type = '".intval($description_type)."'"; |
|
| 358 | 358 | $rs = Database::query($sql); |
| 359 | 359 | $row = Database::fetch_array($rs); |
| 360 | 360 | $description_id = $row['id']; |