如何在PHP中通过Postgres编译整数数据?通过PHP从Postgres正确读取数据类型
我的整数的字符串作为以下节目由var_dump ($_SESSION)
'logged_in' => int 1
'user_id' => string '9' (length=1) // should be int
'a_moderator' => string '0' (length=1) // should be int
我用下面的代码,这显然是问题的pg_prepare
和pg_execute
后的源代码编译的值。
while ($row = pg_fetch_array($result)) {
$user_id = $row['user_id'];
}
谢谢你的回答! – 2009-08-22 03:01:42