Is it possible to make the data type of a column in a table an object of a class?
For instance, if I have a class that manages strings called “MyString”, is it possible to use it instead of varchar?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you cannot. That’s why we have ORM : Object Relational Mapping
Quoting Wikipedia :
I think that’s what you were looking for, good luck !
For good ORMs libraries in PHP, look at this : Good PHP ORM Library? on S.O