Why doesn't PHP MySQL create data types?

I thought about this for a long time, but I never heard an explanation.

I assume that either the MySQL C API was simply not designed to transfer data in the original type (which sounds like a design flaw), or the original mysql driver (replaced by the mysqli driver) was simply poorly designed and the mysqli driver tried to be backward compatible.

I understand that PostgreSQL types are types in PHP, for the most part .. why MySQL? Is it common practice in other languages ​​and RDBMSes to return all values ​​as a string?

+3
source share
2 answers

, MySQL 2000/2001 ( , ?). PHP (PDO) 2004 , , PHP .

(PHP), , .

, PHP , , ...

+1

mysql . mysqli ( "" "", ), PDO , , bin/int/char.

+2

Source: https://habr.com/ru/post/1758204/


All Articles