x


Using Unity to connect to a Database

I'm interested in developing a very simple ranking system using my webhost.

I'm not quite sure how to go about accessing the db and checking for ranks and inserting ranks.

Basically, do I use C# to connect to the db. Run a SQL query on the database. Figure out if the player's current score is higher than any higher in the DB. IF so then insert.

To show the rankings, access the db, retrieve all the ranks. and display them in the unity program?

OR do I use like PHP and do this stuff? I don't know much about php but I found a tutorial for php/mysql.

http://www.freewebmasterhelp.com/tutorials/phpmysql

Any advice and help is greatly appreciated. Thanks

more ▼

asked Apr 06 '11 at 06:25 AM

RoR gravatar image

RoR
346 73 86 97

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

There is an example in the wiki: Server Side Highscores
incl. MySQL, PHP and JS code

more ▼

answered Apr 06 '11 at 07:19 AM

efge gravatar image

efge
5.1k 5 14 40

thnx ... jst checked out the link . jst cant wait to start interfacing php with unity .. hope dis helps .. :)

Nov 27 '12 at 08:57 PM parjanyaroy
(comments are locked)
10|3000 characters needed characters left

I use WWW and PHP/mySQL, it's pretty easy.

more ▼

answered Apr 06 '11 at 07:07 AM

DaveA gravatar image

DaveA
26.8k 153 171 257

(comments are locked)
10|3000 characters needed characters left

Hi, I am using sql lite and after build the executable doesn't show any values from database....can you help?

more ▼

answered Nov 07 '12 at 09:05 AM

ravi_gohil999 gravatar image

ravi_gohil999
1 2 6

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3885
x241
x135
x65

asked: Apr 06 '11 at 06:25 AM

Seen: 4290 times

Last Updated: Nov 27 '12 at 08:57 PM