i have this code to update a value in the database, but this only works if there is already something in the database. is it possible to check if the database is empty first and if its empty INSTERT something into the databse, else just update it with this code.
$name = $_POST['example'];
if (isset($_POST['example'])) {
$sql = 'UPDATE `table` SET `column` = "' . $name . '"';
$stmt = $this->db->pdo->prepare($sql);
$stmt->execute();
return $stmt->rowCount();
}