Jump to content

DexterBlake

Resident
  • Posts

    6
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Wreckers Entertainment Sim consists of a Rock Club, Country Club, Live Venue, and Shopping Village & Events Center. We are looking to fill management positions immediately. Please contact Dexter Blake (dexterblake resident) or Sly Von Schweetz (Asylum Miggins) if you are interested in any of the following: Wreckers Rock Club: DJ Manager Club Manager Wreckers Country: DJ Manager Host Manager Club Manager Wreckers Village: Events Coordinator Marketing Coordinator Filled Positions and Position Descriptions can be found on this temp webpage while the Wreckers Entertainment website is constructed: http://maldexsystems.x10.mx/wreckers/wreckers.html Wreckers Entertainment Facebook: https://www.facebook.com/wreckersentertainment Contact via notecard is preferred.
  2. Rolig provided a great answer, but I'd like to expand on that just a little bit. We each have our "goals" in SL, and only you can decide what your goal is. SL is open-ended, just like real life. So, your purpose in SL can be as simple as a virtual chat room, or as complex as learning new skills and putting them to use. Since you asked how to meet new people, specifically, then I have some suggestions. As Rolig mentioned, the search tool is your friend and it's the best way for you to accomplish your task. However, there is one niche in both RL and SL that everyone has in common -- Music. In SL, one of the most common "meeting places" are clubs. Here a person can meet new people, listen to their favorite types of music, and begin to learn about SL and how it all works. There are small clubs, big clubs, crowded clubs and clubs that have just a few regulars. No matter which you choose to attend, the chances of you meeting folks quickly are greater when you go to where the people are. When you choose a club to go to, don't be afraid to speak first. Don't be afraid to say "Hey, I'm new to SL!".... While you'll find that some people have probably opened your profile the moment you came through the door, you'll also find that you will be welcomed. All you have to do is be yourself, be open to new friendships, and be ready to have fun. If you can do that, the community that is Second Life will make the rest happen all on its own. Good Luck in your endeavors. And if you need a good place to go, send me a message. I'm a DJ and have been around for a while, and I can certainly tell you clubs to visit that you will be able to comfortably begin your SL journey.
  3. Here is the solution to the problem I originally posted. As mentioned previously, SLDB doesn't store data in a way that is helpful if you wanted to expand on it for more than just spitting all the data back into SL. Due to that, my intention is to rewrite the scripts and offer them to other beginners to LSL and external databases. For now, however, in order to separate those values so that you can print them out in a table format, in a single row per uuid, you need to write your Select query in a way that basically renames your table data. SELECT t1.uuid, t1.value AS name, t2.value AS size FROM sldb_data t1, sldb_data t2\n" . "WHERE t1.uuid = t2.uuid AND t1.field = \"name\" AND t2.field = \"size\" You can give a different name to a table in a query. This is done in the FROM part. "sldb_data t1" gives the name "t1" to the table "sldb_data". As we want to fetch two different rows from the same table we have to use the same table twice but we must give it two different names otherwise mysql doesn't exactly know what you want. You can think of it as if you had two identical tables. Now we look for a row in t1 where field="name", in t2 where field="size" but only match those together with same uuid. After the SELECT we just list the fields we want in our result. And again we give a name to the fields. But with fields you have to use the "as". Now for the php script that calls the info into an html table, we use these renamed fields: <html> <head> <title>Retrieve data from database </title> <link href="sldb.css" rel="stylesheet" type="text/css"> </head> <body><?php$con=mysqli_connect("localhost","****","****","****");// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }$result = mysqli_query($con,"SELECT t1.uuid, t1.value AS name, t2.value AS size FROM sldb_data t1, sldb_data t2\n" . "WHERE t1.uuid = t2.uuid AND t1.field = \"name\" AND t2.field = \"size\" ");echo "<table border='1' class='db-table' align='center'><tr><th>Name</th><th>Size</th></tr>";while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['name'] . "</td>"; echo "<td>" . $row['size'] . "</td>"; echo "</tr>"; }echo "</table>";mysqli_close($con);?> </body> </html> You can compare that to the original post and you will see how we now are able to create a single row of all information grouped by UUID. Although this isn't the recommended way of storing data, you can, technically add new fields and values to the LSL script, and just use the same principle of adding t3, t4, t5..etc, then grouping by the common UUID key.
  4. Yes, it was definitely worth every penny of the purchase. About the same worth of the help I've received here. Sarcasm is beautiful. I should mention that neither solution offered worked. That is ok, I will keep working and post the solution for others who might have the same questions, or I will rewrite all the scripts to separate the fields and values.
  5. Thank you for your replies. I appreciate the help. Firstly, I'd like to say that you might have missed the point. I've made no errors. I didn't write the database, didn't write the scripts, except for the basic php script to pull data into an html table. Also, this is from SLDB, from Aubretech, which has been discussed on these forums before, just not on this topic. Doubling up the field and value is how the script was written and not how I would have wanted it done. But, if I were to rewrite the LSL script that passes the values to http (and I did attempt that), then I would also have to rewrite the database.php script which parses those values and creates and updates the tables(which was written specifically for the way the LSL side was set up). Which is what Plan B was. I just figured I would ask (for once), rather than stumble into the answer. As far as I understand it, no support is offered for the SLDB script, so naturally since it is SL-DB.. my first stop was here. I will try the advice about doubling the loop, Thank you. And meanwhile, LepreKhaun, I'll look forward to the chuckle I'm supposed to have when I figure out what you mean. That statement was confusing, since I do know what field and values mean... must be missing something. You're right though, the documentation provided by the SLDB makers was pretty spotty. In fact, downloading the files from MP, gives you a link to the files with bad code. While attempting to fix this, I went to their documentation page, which had a different link to download the files, which had the 'fixed' code. But, as I said, they don't offer support and pretty much tell you to figure out yourself, since it was free. Edit to add: Btw, I did try this: echo "<td>" . $row['name'] . "</td>"; echo "<td>" . $row['size'] . "</td>"; before I posted. But that gives me nothing, just a blank table. I thought that might be because the Select query needed to be written in another way. Getting the loop to fire twice is probably the best way to handle this issue, although not the ideal thing to be doing. And I had already thought of that, but again.. not proficient enough to know what to do without either asking or more research. I would prefer to write things so that the table is 'id', 'uuid', 'name', 'size', 'time'. I'm unsure why the SLDB makers felt that setting up fields and variables was the easiest and most flexible solution.. but, we'll just chalk that up to my ignorance. Maybe down the road a light will turn on and I'll be all, "Oooh.. I get it now.. damn".
  6. Hello, I'm working with SLDB, and as it stands, the scripts function as advertised. My intention is not to bring the data back into SL, however. The data that I store, I wish to call back into a website table. Currently, the way SLDB is set up, it stores fields in this fashion: Key (the uuid key), Field, Value Field contains: Name and Size Value contains: (the name of the person) and (the agent size) So, Field and Value contain multiple variables, with Key being the primary key and common denominator. Where I run into a problem is that I want to be able to display information like this: Name Size Dexterblake Resident <1,1,1> AnotherPerson Resident <1,0,1> I am not proficient enough with mySQL to understand how to get the fields (Field, Value) with multiple variables to display seperately in a single row. Currently, this is how it prints out: http://wickednight.net/contests/photo-december/results.php This is the simple php I've written: <?php $con=mysqli_connect("localhost","***","***","***"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM sldb_data"); echo "<table border='1' class='db-table' align='center'> <tr> <th>Name</th> <th>Size</th> </tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['field'] . "</td>"; echo "<td>" . $row['value'] . "</td>"; echo "</tr>"; } echo "</table>"; mysqli_close($con); ?> I appreciate any help you can give.
×
×
  • Create New...