Fill Arrays with data from mysql
Hello! I am a noob that is going too far from my ridiculous skills. This is what I'd like to achieve:
I have a "Cat picture" and a "Dog picture" (that in my mind will be stored in a server e.g. /images/animals/cat.png or dog.png).
And then I have ... a "Cat" string and a "Dog" string. Unity takes randomly one pic and one string and then you have to select what Pic matches with the "DOG" string.
So I was thinking about doing a Mysql tables which contains all the data I need, E.G.
ID 1. "Cat" - "Gatto" - "/images/animals/cat.png" ID 2. "Dog" - "Cane" - "/images/animals/dog.png" ID 3. "Bird" - "Uccello" - "/images/animals/bird.png" ID 4. "Fish" - "Pesce" - "images/animals/fish.png".
I found a tutorial online where a guy receives strings from MYSQL and store into an array. It may work, but I'd have to create different tables one for the english name, one for the italian name, one for the URL and then use (of course) the same index array for comparison.
Is there a way to get just columns of the same db table to create the same different array?
How would you achieve something like I described?
Thanks and sorry for my bad english and my messy exposition!
Your answer
![](https://koobas.hobune.stream/wayback/20220612164014im_/https://answers.unity.com/themes/thub/images/avi.jpg)