php - Codeigniter - value in subquery being ignored -


not sure i'm going wrong query, value dateread being ignored , getting

error message: undefined property: stdclass::$dateread.

select `id`.`id`, `id`.`name`, `id`.`deleted`, `id`.`filepath`, `id`.`createddate`, (select createddate dateread documents_users iu id.id = iu.docs_id , iu.users_id = 2346) (`documents` id) join `documents_years` iy on `id`.`id` = `iy`.`docs_id` 

can help?`

just update query , fetch value of $dateread need define dateread after completion of sub_query , not within sub_query else it'll (select createddate documents_users iu id.id = iu.docs_id , iu.users_id = 2346)

select `id`.`id`, `id`.`name`, `id`.`deleted`, `id`.`filepath`, `id`.`createddate`, (select createddate documents_users iu id.id = iu.docs_id , iu.users_id = 2346) dateread (`documents` id) join `documents_years` iy on `id`.`id` = `iy`.`docs_id` 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -