pg_query result contains strings instead of integer, numeric

后端 未结 2 2097
难免孤独
难免孤独 2020-11-28 16:22

When I get data from a postgresql database with pg_query,pg_fetch_assoc all numeric fields get returned as strings. Is there a way around this or do I have to typecast every

2条回答
  •  攒了一身酷
    2020-11-28 17:11

    That's what PHP does. From the manual:

    Each value in the array is represented as a string.

提交回复
热议问题