// 1 dodaje $q = $this->db->prepare('INSERT INTO help (category) VALUES (:category)'); $q->bindValue('category', $this->category); $q->execute(); // 2 pobieram $q = $this->db->prepare('SELECT category FROM help WHERE category = :category'); $q->bindValue('category', $this->category); $q->execute(); return $q->fetchAll(PDO::FETCH_ASSOC);
Co robię źle (proszę tylko nie bić). Oczywiście nie chce tutaj robić pętli i następnie jechać stripslashes bo to bez sensu.
Pozdrawiam, mhs.