[eluser]Animas[/eluser]
In my blog type app I used
Code:
$this->db->where('title', $this->uri->rsegment(3));
to match an entry(didn't use traditional "id" here).
1. If a entry in db is like "My post title a" then matching [assume $this->uri->rsegment(3) is "My post title a"] doesn't work. See each word is separated by "space".
2. But ff a entry in db is like "my-post-title a" then matching [assume $this->uri->rsegment(3) is "my-post-title a"] works. To do this I will have to enter title entries into db as "my-post-title a" which I don't want. See each word is separated by "-".
So how do I make 1(space) work?