NotionCommotion Posted December 10, 2019 Share Posted December 10, 2019 The classes with the name of the first query column are located one directory above the file making the query. Tried use aliases as well as trying to include the name space in the first column of the query but no luck. Thanks $stmt->fetchAll(\PDO::FETCH_CLASS | \PDO::FETCH_CLASSTYPE); Quote Link to comment https://forums.phpfreaks.com/topic/309665-is-it-possible-to-use-pdofetch_classtype-with-namespace/ Share on other sites More sharing options...
kicken Posted December 10, 2019 Share Posted December 10, 2019 I haven't used those particular options, but I'd think you just need to include the full namespace path of your class in the column value. PHP would then use auto-loading if necessary to load the class definition. Quote Link to comment https://forums.phpfreaks.com/topic/309665-is-it-possible-to-use-pdofetch_classtype-with-namespace/#findComment-1572422 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.