Hi guys,
I need to find an answer to this as I am coding between PHP and Postgresql.
$vara=(a string value selected by user);
Now I want to do a select statement based on $vara, but
$sqlc=pg_query("SELECT '$vara' FROM table1 WHERE empid='$empid'");
$sqlarr=pg_fetch_array($sqlc);
This query will return only 1 row and I only need the value of the column $vara specified by the user. However this doesnt work at all and I do not know how to extract the value of the resulting array, how do I do that?