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