Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - CodeIgniter d B- & gt; Query query result shaping variable string
CodeIgniter d B- & gt; Query query result shaping variable string
I've been thinking about your problem for a long time. I thought it was CI defect. I chased the CI source code for a long time until I got to the PHP statement. It took a long time to understand.

You know, there are many types of data stored in the database. If you want to take out typed data, the environment may not support it, so the communication between PHP and mysql is a string.

This is not a defect of words, nor is it a defect. That's the only way. Otherwise, you set an enumeration type in the database and let PHP get it. What happened to PHP?

In short, the data from the database can only be of string type. You can take it out and transform it.

In my opinion, from the perspective of database foreign key system, various database foreign keys and types are only restrictions on the data in the database, a kind of restriction similar to regular expressions.

Settings belonging to the database and the privacy of the database will not be made public.