Salve, ho il seguente metodo PHP:
public static function getEntityData($entityID) {
$sql = "SELECT * FROM \"entity\" WHERE \"entityid\" = $entityID";
$res = pg_query(DataManager::_getConnection(),$sql);
if(! ($res && pg_num_rows($res))) {
die("Failed getting entity $entityID");
}
return pg_fetch_assoc($res);
}
Non ho ben capito l'istruzione if. Cosa fa esattamente?