:pg_exec():查询失败:错误:列&;quot;dd&;”;


: pg_exec(): Query failed: ERROR: column "dd"

我正在尝试从dd='thiruvalul'中获取值,它可以使用mysql,但不能使用pgsql(请为我提供建议)

include('connection.php');
$value='Thiruvallur';
        echo $result = pg_exec($db,'SELECT "DD" FROM "table name" where "DD"=$value');
    while($row = pg_fetch_array($result)) {
        echo $santh=$row['DD'];
    }

参考网站,如select where条件传递参数http://www.tutorialspoint.com/postgresql/postgresql_php.html