public function insertPrice(Price $price) { $cn = new Conexao(); $sql = "INSERT INTO prices_added (name, description, price, place_id, place_api_id) VALUES ('" . $price->getName() . "','" . $price->getDescription() . "','" . $price->getPrice() . "','" . $price->getPlaceId() . "','" . $price->getPlaceApiId() . "')"; $result = $cn->execute($sql); $id = $cn->returnInsertedId(); $cn->disconnect(); if ($result != false) { return true; } else { return false; } }