[eluser]Firestorm ZERO[/eluser]
I'm currently working on articles which are stored in a mySQL db and looking at the idea of clean urls.
I'm wondering what is the best way to implement the links for clean urls.
Using url_title($var) to change the article title to produce the clean url so I can have like "test.com/article/name-of-article/".
But to look for it then I think I will have to store the clean url of the title ("name-of-article") in the database or else I will be have to search through the whole DB and convert each title to look for it since I have not passed the unique id (article_id).
I have seen other sites do like "test.com/article/article-id-name-of-article/" or "test.com/article/article-id/name-of-article/"
I believe Wordpress puts the date before the article title. So I guess it limits the search by date first and then looks for the title since the chance of two articles of the same name on the same date would be rare. (But then how does it handle duplicates?)
So what is the best way to implement this?