lundi 1 mars 2021

Select random field from database in Python

So I am developing a Django app and what I want at the moment in to develop a script that selects a random field from a row with 3 words in a MySQL database that I have. I have searched for info but haven't managed how to do it.

My database:

enter image description here

What I want is the script to read the database and select a random word each time. I haven't worked so much with DBs in Python so I have no clue about how to do it. Help is much appreciated.




Aucun commentaire:

Enregistrer un commentaire