:pg_exec():查询失败:错误:列" dd"

时间:2015-02-24 09:48:02

标签: php database

我正在尝试从 dd =' thiruvallur' 中获取价值,但是它无法使用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'];

    }

1 个答案:

答案 0 :(得分:0)

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