How to detect Post Id from Slug
Posted: Thu Jul 12, 2012 2:58 am
Hi to all.
I have a data in news panel and also I saved slug against this value.
My link make like this.
http://ilm.com.pk/portal/events/this-is ... ther-event
So How I can detect Id from slug to display data.
My Query is like this
How will I Get Event Id from Slug /this-is-new-another-event
Please help.
I have a data in news panel and also I saved slug against this value.
My link make like this.
http://ilm.com.pk/portal/events/this-is ... ther-event
So How I can detect Id from slug to display data.
My Query is like this
Code: Select all
$sql = $this->MMdbobj->query("SELECT * FROM tbl_news where news_id=$_REQUEST[event_id]");
$sendcontents = $this->MMdbobj->fetch_assoc();Please help.