Gilles Ganault
2008-02-21 01:46:13 UTC
Hello
Is this the standard way to check that a row exists in PHP/SQLite, or
is there a better syntax?
========
$query = "SELECT count(*) FROM contacts WHERE contacts_phones_tel GLOB
'%s*';
$query = sprintf($query,$row['calls_phones_tel']);
$query = $dbh->query($sql)->fetch();
if(!$query[0]) {
//Not found in table
========
Thank you.
Is this the standard way to check that a row exists in PHP/SQLite, or
is there a better syntax?
========
$query = "SELECT count(*) FROM contacts WHERE contacts_phones_tel GLOB
'%s*';
$query = sprintf($query,$row['calls_phones_tel']);
$query = $dbh->query($sql)->fetch();
if(!$query[0]) {
//Not found in table
========
Thank you.