I want to use PHP to check if a database entry (SQLlight) already exists.
I fetch the DB Records first:
$db->exec("SELECT * FROM $tbMgmt WHERE resourceId LIKE '$resourceId' AND EventType Like '$EventType'");
When the Result is 0, I want to proceed with my Script. if the Result is 1 or higher, I want to stop:
if ($db) {
echo "Record already exists!";
} else {
// proceed with my Script ...
}
How can I solve this?