D
D
dev4002016-02-23 00:18:10
PHP
dev400, 2016-02-23 00:18:10

How to preserve data types when fetching from MYSQL?

The data from the id("int" column, respectively), after the associative selection is defined as "string". How to overcome?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Trusov, 2016-02-23
@dev400

Check if you have an integer in your base, because it should work out of the box. Alternatively, cast to int manually.

See comments. Ashamed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question