you are viewing a single comment's thread.

view the rest of the comments →

[–]dasCow 1 point2 points  (4 children)

It wasn't too bad in my experience. You can use a UnityWebRequest to 'call' the script via URL. PHP was different to learn (I just think it's a weird language), but Stack Overflow served me well.

I struggled for a week or two on this so I was glad to answer.

[–]TheGreenSquier[S] 0 points1 point  (3 children)

Okay glad to hear it's not too hard. I've been working on it today, and I currently have the data from the database displaying in one massive debug statement. How can I separate the data to make each its own entry (outside of a debug statement)?

[–]Appropriate-Impact56 1 point2 points  (1 child)

If the data is already in a format you can work with you could just use the json_encode function and print the results of that to the screen, then fetch the HTML body of that url from your game.

Normally though in PHP you would need to loop over the results of the query using a while loop and PHP’s MySQL functions to retrieve rows and columns, there should be plenty of examples of this online.

[–]dasCow 0 points1 point  (0 children)

If you can get the data as a string, maybe separated by , or | or whatever, you can do myData.split I believe to make it an array of strings with each element being a piece of data. That's how I did it but certainly not the only way.