Accessing mySQL databases

I was wonder how can I access my mySQL database through Unity3D? It is run through PHPmyadmin. Any links to tutorials or example code would be appreciated. :smile:

If I’ve read the docs correctly, Unity 3.0 supports Linq through the new Mono version.

Quick cross check: Yes… when accessing the ā€œWhat’s new?ā€ stuff through the Help menu of Unity 3.0, I see under ā€œ14 Mono update new featuresā€ → Linq

So, normally you should be able to access MySql through the appropriate Linq layer.

I have the free version of Unity3D not 3.0. :?

You can use System.Data

but you will, as far as I remember, require an additional assembly + unmanaged dll (-> standalone only though no problem as you don’t want mysql on the webplayer anyway)

@Dreamora
Actually I do want it on the webplayer, I’m making a login feature for my game that will also be used with my website.

For that you will want to use WWW() to post to a php page, and than retrive the page as a varible with data you can than use to see if your players pass was correct. There’s a full tutorial on this with the php pages on unifywiki, if you can’t find one that will work, just PM me with what you want the php page to do and I’ll make you one :slight_smile: since I’m a pretty good web dev (3games, 8 custom websites)