True/false value of SELECT statement.

From: Date: Mon, 31 Jul 2000 21:22:51 +0000
Subject: True/false value of SELECT statement.
Groups: php.db 
Request: Send a blank email to php-db+get-1654@lists.php.net to get a copy of this message
I'm using a SELECT statement in my PostgreSQL db to test if a record has already been added. If it hasn't, then obviously there is no result. How do I set up an if/else structure to handle this? I've been trying: if (!$resultSet) { add the record } else { don't add it (but i need this else block because i'm using it to add something to another part of the db) } ... but this doesn't seem to work.

« previous php.db (#1654) next »