Validating Sql Query With Php
The validation seems to fail for some reason. By the validation, I mean the 'if ($result)' -part. How can I correctly validate SQL-query? $dbconn = pg_connect('host=localhost port=
Solution 1:
I suspect that the return value is integer zero which is also interprested as false in the if statement. By doing "if ($result !== FALSE)" (Note that it should be !== and not !=) you'll verify if the result really is different than FALSEand not just false...
Post a Comment for "Validating Sql Query With Php"