function insertKeyword($keyword) { global $keywordInsertStmt; $existingKeywordId = getKeywordId($keyword); if ($existingKeywordId != null) { return $existingKeywordId; } $keywordInsertStmt->bind_param("s", $keyword); $keywordInsertStmt->execute(); return getLastInsertedId(); }
public function addUser($name, $email) { $sql = "INSERT INTO users (name,email) VALUES " . "('" . $this->quote($name) . "','" . $this->quote($email) . "')"; $this->executeQuery(); return getLastInsertedId(); }