44 $result = $this->db->queryf(
'
45 SELECT * FROM payment_topics
46 LEFT JOIN payment_topic_usr_sort ON ptus_pt_topic_fk = pt_topic_pk
48 WHERE pt_topic_pk = %s',
49 array(
'integer',
'integer'),
52 while(
$row = $this->db->fetchObject($result))
71 $this->changedate = time();
73 $statement = $this->db->manipulateF(
'
75 SET pt_topic_title = %s,
78 WHERE pt_topic_pk = %s',
79 array(
'text',
'integer',
'integer',
'integer'),
93 $this->createdate = time();
95 $next_id = $this->db->nextId(
'payment_topics');
96 $statement = $this->db->manipulateF(
'
97 INSERT INTO payment_topics
102 ) VALUES (%s, %s, %s, %s)',
103 array(
'integer',
'text',
'integer',
'integer'),
106 $this->
id = $next_id;
107 if($this->
id)
return true;
118 $result = $this->db->manipulateF(
'
119 DELETE FROM payment_topics
120 WHERE pt_topic_pk = %s',
122 array($this->
getId())
125 $result = $this->db->manipulateF(
'
126 DELETE FROM payment_topic_usr_sort
127 WHERE ptus_pt_topic_fk = %s',
129 array($this->
getId())
132 $result = $this->db->manipulateF(
'
133 UPDATE payment_objects
135 WHERE pt_topic_fk = %s',
136 array(
'integer',
'integer'),
137 array(0, $this->
getId())
150 $result = $ilDB->queryf(
"SELECT pt_topic_title FROM payment_topics WHERE pt_topic_pk = %s",
151 array(
'integer'), array($a_id));
153 while(
$row = $ilDB->fetchObject($result))
155 return $row->pt_topic_title;
167 $res = $this->db->queryf(
'
168 SELECT * FROM payment_topic_usr_sort
169 WHERE ptus_pt_topic_fk = %s
170 AND ptus_usr_id = %s',
171 array(
'integer',
'integer'),
172 array($this->
getId(), $ilUser->getId())
175 if($this->db->numRows(
$res) > 0)
177 $statement = $this->db->manipulateF(
'
178 UPDATE payment_topic_usr_sort
179 SET ptus_usr_id = %s,
181 WHERE ptus_pt_topic_fk = %s',
182 array(
'integer',
'integer',
'integer'),
188 $statement = $this->db->manipulateF(
'
189 INSERT INTO payment_topic_usr_sort
193 ) VALUES (%s,%s,%s)',
194 array(
'integer',
'integer',
'integer'),
215 $this->title = $a_title;
223 $this->createdate = $a_createdate;
231 $this->changedate = $a_changedate;
239 $this->sorting = $a_sorting;
247 $this->custom_sorting = $a_custom_sorting;