Welcome Guest, Not a member yet? Register   Sign In
URI PROBLEM/Query Problem
#1

[eluser]Unknown[/eluser]
using this uri and i get the value of uri value when i post nothing then it ll give null and if i post 0 value then i get the value zero but when i execute the query for seraching at that time i am using like then it'll not give properer output.


$uri = $this->uri->uri_to_assoc(3);

$this->search = $uri['search'];

and query look like :

$query = $this->db->query('SELECT * FROM (select mst_task.*,rlt_task_deadline.taskId as tId,rlt_task_deadline.deadlineDateTime FROM (`mst_task`) LEFT JOIN `rlt_task_deadline` ON `mst_task`.`taskId` = `rlt_task_deadline`.`taskId` ORDER BY `deadlineDateTime` desc) as tmp WHERE tmp.taskId NOT IN (select taskId from trn_task_assign) and tmp.title LIKE "%'.$this->search.'%" and tmp.`userId`='.$this->session->userdata("user_id").' GROUP BY tmp.title order by tmp.dateAdded desc');




Theme © iAndrew 2016 - Forum software by © MyBB