I have a table like this
CREATE TABLE test(a int, b int);
The values to the table are inserted from dynamic input
$a, $b (PHP variables)
$query = "UPDATE test set a=$a where b = $b";
pg_query($db, $query);
This doesn't work when $a is empty (i.e when the user doesn't enter any value for a form field from the table). How to I get around this?