$str = trim($somestring);
$sql = "UPDATE project SET name = '" . $str . "' WHERE id = $id";
When I am using this code without the trim()
I can see the value in postgresql field (phpPgAdmin).
But when I use trim()
, then:
The value in phpPgAdmin seems to be blank (not NULL
). I can echo$str
and see it. I can also click on "Edit row" button and there I see the name field with the proper value. But I can't see it when I am browsing table content (the rows) -> then the name field is empty... Why is that?
Is this PgAdmin bug or what?