class of objects created by mysqli_result->fetch_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I fetched some data from my MySQL database into objects. These are of class stdClass. Now I wonder about the sense of having objects without methods defined. In fact, I cannot benefit from any of the OO advantages (namely property protection, controlled method calls on class properties) unless I wrap the properties of these instances of stdClass to a custom class, right?

Is there any way to fetch MYSQL data to a suitable class other than stdClass - suitable in the sense of: the custom class has all properties which are fetched from db.

thx
Stefan

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux