Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
u2_progc [2011-01-21 11:09]
Joakim Forsgren
u2_progc [2017-09-01 14:54] (current)
Line 56: Line 56:
  
 // lite kod från forum.php (model_forum) // lite kod från forum.php (model_forum)
 +public function InsertItem ($data) {
 +  $this->​table='​lab5_Items';​
 +  return $this->​Insert($data);​
 +}
 +
 public function DeleteThread ($threadid) { public function DeleteThread ($threadid) {
   $query = "​DELETE lab5_Threads,​ lab5_Items FROM `lab5_Threads` LEFT JOIN `lab5_Items` USING(ThreadID) ​   $query = "​DELETE lab5_Threads,​ lab5_Items FROM `lab5_Threads` LEFT JOIN `lab5_Items` USING(ThreadID) ​
Line 62: Line 67:
             OR " . service_session::​getInstance()->​Get('​Admin'​) . "​)";​             OR " . service_session::​getInstance()->​Get('​Admin'​) . "​)";​
   return $this->​db->​Delete($query);​   return $this->​db->​Delete($query);​
-} 
- 
-// Från forum.php 
-public function InsertItem ($data) { 
-  $this->​table='​lab5_Items';​ 
-  return $this->​Insert($data);​ 
 } }
  
 </​code>​ </​code>​