0
$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?

gvlasov
  • 18,638
  • 21
  • 74
  • 110
linderman
  • 149
  • 1
  • 9
  • can you pls post var_dump($somestring); and var_dump($sql) when the query didnt work – donald123 Feb 02 '15 at 11:37
  • What's the content of $str? Perhaps it is an issue with phpPgAdmin not escaping the field properly. – Markus Müller Feb 02 '15 at 11:39
  • I think it's a phpPhAdmin issue, I have the same issue. I have table, and when I am browsing, I see nothing in the field, but if I select, the value is there. – vaso123 Feb 02 '15 at 11:48

0 Answers0