query error

cant get this record to update I think my query has a error cant find it though!

<?php $host = "host=127.0.0.1"; $port = "port=5432"; $dbname = "dbname=x"; $credentials = "user=x password=x"; $id= $_GET['id']; $db = pg_connect( "$host $port $dbname $credentials" ); if(!$db){ echo "Error : Unable to open database\n"; } else { echo "Opened database successfully\n"; } $sql =<<

[php]
$sql =<<<EOF
UPDATE table1 set f5 = ‘true’ WHERE f3=’ . $id. ';
EOF;
[/php]

You are mixing string formats here. See:
http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Sponsor our Newsletter | Privacy Policy | Terms of Service