Hi
I have databse having id and name field. In that I wanted to fetch random names from that database but the records which fetch in 1 st attempt wpuld not repeat in next attempt.
May be this can be done by using some stored precedure or something else i.e. i have to stored those values in some table and apply rules not pick values which is equal to that but i am not getting exact way of doing this.
so please do reply as early as possible.
ruchi18 0 Light Poster
Recommended Answers
Jump to PostOne query knows nothing about another, so you would have to keep track. Bascially if you add a 'count' column, then you can sort by it, and select random from those. You would have to update the records, so a stored procedure is an option.
All 4 Replies
urtrivedi 276 Nearly a Posting Virtuoso
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
ruchi18 0 Light Poster
urtrivedi 276 Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.