When you create an object with PHP column name properties, you can combine the class definitions and fetch logic to be passed in the same file as follows:
This is the class definition as an external file
I wanted to use it by loading it into fetch logic, but I couldn't.
Instance generation is complete, so the class itself can be loaded into the file.
I did a lot of research, but the main method was to define how to access the ORMapper model class.
Is it better to put fetch logic in the class?
Please tell me how to separate the class definition from fetch.
Hello, nice to meet you.
I divided the files with sqlite3 and created a similar environment.
The output shows that the results are mapped to a message.I don't know the full picture of the code from your question, so please compare it.
Below is the code we created.
© 2022 OneMinuteCode. All rights reserved.