Stupid PHP...Its going from - to gb. How does that make sense? I'm taking it down till I figure this out.
Yah. Can you take a look at the code? I've got to eat dinner.
(they're working again! yay!)
It did work (it went from ka to kb, as it should), but after deleting all the previous slugs, it now goes to gb.
And you're saying that there are no rows in that table?
When you get back - what did you change since last time? Why not just revert how you were doing it before?
No, there are rows in the table. Right now, its up to _, and that should progress to -
The reason I didn't keep it the was it was is because I would have gotten only 130 URL's, when I should have gotten 4225
Hm, just to test, what happens if you remove 'g' from the $alphabet array? Does it return 'fb' or 'hb'?
What do you mean, you'd have only gotten 130 URLs? It says in the script there're nearly 17 million possibilities.
You can ignore that. I never deleted the old comments.
Hmm...Now it says the previous slug is ga...How wierd.
After you removed 'g' from the alphabet?
Do you have an IM account that we can talk on?
Found it. It was buried a page back. Working like it did before, not how I want.
How can there only be 130 possibilities? (26+26+10+2)*(26+26+10+2) = 4096
it was going from aa to -a, then -a to -- So, 65 +65 = 130
Because it was going from aa - ba ... _a -a = 65 possiblilities.
Man, I wish there was some open-source URL shortening service
It would be much easier to see how they do it.
It uses MD5 hashes of urls to create the suffixes.
Well, the code wasn't exactly made for what you're trying to do. x_x
AHA! I know! I know! I just read on how to do it. Use base36 or base31:
pastie.org/233392
Just grab the row's ID and convert to base31
and.. voila! A good, unique ID
But the idea is to have it increment, though. Unique IDs aren't the issue.
If I read it correctly, it still will increment
We could just try that, see if it works.