SQLite Forum

Return boolean if item EXISTS in database
Login
Thanks but still it does not work...

    $EntryExistsBoolean = $db->querySingle("SELECT EXISTS (SELECT 1 FROM myTable WHERE company='SmartCo'))");

    if ($EntryExistsBoolean === FALSE)
        {
            echo "Record does not exist";
        }
        else
        {
            echo "Record exists";
        }