method addLink documentation in bbn\User\Preferences

Sets (or unsets) the id_link field of the given preference and returns the result of the executed query

function(string $id_option, string $id_link) { $id = $this->db->selectOne( $this->class_cfg['table'], $this->fields['id'], [ $this->fields['id_user'] => $this->id_user, $this->fields['id_option'] => $id_option ] ); if ($id) { if ( $this->db->update( $this->class_cfg['table'], [ $this->fields['id_link'] => $id_link ], ['id' => $id] ) ) { return $id; } } elseif ( $this->db->insert( $this->class_cfg['table'], [ $this->fields['id_user'] => $this->id_user, $this->fields['id_option'] => $id_option, $this->fields['id_link'] => $id_link ] ) ) { return $this->db->lastId(); } return null; }

Sets (or unsets) the id_link field of the given preference and returns the result of the executed query BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.