Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting data from external db

Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
07-07-2008 14:42
I have a table that has only 1 row populated with several text fields called CLUE1, CLUE2 CLUE3


I am looking for sample script for:

in second life, upon touching an object with this script it will log into the external db and retrieve and dispay out to local chat the content of the fields. I have scripts that POST data into external databases..just never could figure out how to retrieve and display data in SL.


in real life...what would the PHP script you are calling from within the SL object script look like?

Thanks
Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
07-07-2008 18:44
Do I use the httprequest GET method for this?
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-07-2008 21:59
all the database functionality is done on the web server, all lsl can send and receive is plain text

http://www.phphelps.com/10_How_to_connect_and_fetch_data_from_mySQL_database_in_PHP.shtml
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
07-07-2008 23:01
Maybe this thread will help:

/54/3c/220594/1.html
highlight=retrieve+database

and this lslwiki link:
http://www.lslwiki.net/lslwiki/wakka.php?wakka=ExamplellHTTPRequest

and the comments on the above lslwikipage:
http://www.lslwiki.net/lslwiki/wakka.php?wakka=ExamplellHTTPRequest&show_comments=1#comments
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
07-08-2008 19:51
thanks for all the references. perfect! works like a charm.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-09-2008 09:34
Why one row? This seems like a good candidate for "SELECT clue.description FROM clue ORDER BY clue.number;" and returning one value per line. If you're going to have multiple puzzles, add another field to the primary key and a WHERE clause to the query.
Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
07-10-2008 12:18
why 1 row? because thats all i need really for the game we are creating. I know it sounds silly but that row will change every month.