[PHP-DB] Fwd: About PDO::fetchObject

2015-06-10 Thread Octopus Puras
I have a MySQL table, whose name is Items: ItemID ItemName ItemDescription I also have a PHP class: class Item { public $id; public $name; public $description; } If I execute $stmt-fetchObject(), I will get an object with fields of ItemID, ItemName, etc. But I want to adapt the name of the

[PHP-DB] About PDO::fetchObject

2015-06-11 Thread Octopus Puras
I have a MySQL table, whose name is Items: ItemID ItemName ItemDescription I also have a PHP class: class Item { public $id; public $name; public $description; } If I execute $stmt-fetchObject(), I will get an object with fields of ItemID, ItemName, etc. But I want to adapt the name of the