How do i show data from database

Get help using Construct 2

Post » Sat May 18, 2013 9:08 pm

Hi everyone, Im new in constructor.

And nees some help.

I have 3 data in a database

Name - Score - Time


how I can show this in constructor 2 in the same line?


thanks
B
17
S
2
Posts: 11
Reputation: 787

Post » Sat May 18, 2013 9:22 pm

If you use a text object:

Set text to:"Name: " & Name & "- Score: " & Score & "- Time: " & Time

Also make sure your text object is long enough
https://www.scirra.com/forum/viewtopic.php?t=152506

And that is why you shall respect the bug reports guidelines, not only giving a capx is making the bug reproductible in one click in a situation they can work with (less time wasted trying to reproduce vague instructions) but also it helps filtering false positives.

Game design is all about decomposing the core of your game so it becomes simple instructions.
B
42
S
17
G
16
Posts: 2,089
Reputation: 15,345

Post » Sun May 19, 2013 5:41 pm

thanks aphrodite. I go try. and. feedback my experience.
B
17
S
2
Posts: 11
Reputation: 787

Post » Wed May 22, 2013 2:03 am

HI Aphrodite, I cant use this solution in my score show. :(

why?

I use this tutorial by ArcaED
https://www.scirra.com/tutorials/346/online-high-score-table-ajax-php-mysql

and he use a Array. I dont know how I can put you solution to adapt this score w/ a array.
you know?
thanks so much.
B
17
S
2
Posts: 11
Reputation: 787

Post » Fri May 31, 2013 5:23 am

Hi, I can show all now perfectly, the arcaED tutorial highscore help me so much,
the solution:

add field in the database table.
post and get. normal

then clear all field text and create new fields.
the get array.x show all in order.

the time I use the timecounter tutorial, send a variable the value integer and convert to time, then send this to my score table. and are all perfect.

when all are ok, upload a capx.

thanks.
B
17
S
2
Posts: 11
Reputation: 787


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests