Hello!
Is there any good developer around ?
I have a little challenge, there is something I'm trying to achieve and I'd like some advice for it.
Not looking for a final solution, but just some clues that could help me to go in the good way
It's about writing a function, and I've never written any
Here is my problem :
I've got a DB with several items, and for each of them I'd like to generate a "random" description, but that would actually always be the same !
So it wouldnt really be a random one actually
For each of the items, ive got several values: id, title, duration, etc ...
I was thinking that I could play with the ID, getting the number and depending on it generating a description. Good idea or not ?
I need this function to be light, because it's gonna calculate this generated description each time the page is rendering !
I've currently already got my description generator, but its writting the result directly in MySQL, and totally randomly. But it was the only way I've found to be sure the description would always stay the same.
And it's a bit painfull to have to re-write in the DB each time I want to add new items into my DB..
Does anyone has a good advice to give me ?