I would like to create a reference field.
I would like it ti have a fixed number of charaters/numbers, just like the videos reference of YouTube.
Is there a mysql/php function to handle that? I mean a function that generates a unique string that doesn't exist already in the table.
Thanks for the tip.
I have noticed that UUID function returns a always a different string,
but i would like to generate one with a fixed length - 10.
I now i could substring the returned string but that is contrary to what i want - the substring may already exists and i want to generate always a new one. Any idea?
I just used a md5 hash of a input variable and then a substr
of 10 characters. Then i make select on the table to check if is a unique id;
if yes Ok; if no just warn the user to change the input variable.
Hi, I am a newbie in developing a website. i have tried to connect using mysqli conncetion
Here is my simple code.
// db.php code
//$con = mysqli_connect("localhost","root","","bakery"); ...
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...