Welcome Guest, Not a member yet? Register   Sign In
Slugs - Help me to understand
#1

[eluser]Mauricio de Abreu Antunes[/eluser]
Hello, i'm trying to understand slugs.

http://ericlbarnes.com/post/13129707173/...ug-library

This post tells me to insert my new with a slug like 'help-me-with-slugs'.
Ok, i understood this part. I can not understand how i can select data from a slug?
Code:
select * from news where slug = 'help-me-with-slugs';
Ok, i can get data from this, but when i insert a slug, it can be duplicated in the database. Is necessary to validate my title?

Btw,
Code:
...where slug = 'help-me-with-slugs'
is not so good to the database.
Performing a query with no primary key like http://www.site.com/news/24/help-me-with-slugs
where 24 is 'help-me-with-slugs' ID.

And what about routes if i get 'help-me-with-slugs' pagination?

Thanks!


Messages In This Thread
Slugs - Help me to understand - by El Forum - 02-07-2012, 10:45 AM
Slugs - Help me to understand - by El Forum - 02-07-2012, 01:41 PM
Slugs - Help me to understand - by El Forum - 02-09-2012, 11:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB