Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3 blogging application bug: post slug updates even if there are no change
#2

(This post was last modified: 09-15-2019, 12:51 AM by jreklund.)

Personally I would scrap this idea and always append the primary key to the url. That's a pretty normal practice.

1-your-title
2-your-title
3-your-title
4-your-title

So that you don't need to worry about making a select every time.

And here's the fix. Only update if there are more than one. As you are updating, there are already one present.
Code:
if ($slugcount > 1) {
Reply


Messages In This Thread
RE: Codeigniter 3 blogging application bug: post slug updates even if there are no change - by jreklund - 09-15-2019, 12:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB