[Opensim-users] opensimulator-splash-screen

Olivier van Helden olivier at van-helden.net
Thu May 31 11:28:14 UTC 2012


LIMIT is used to tell the starting row and the number of rows to show (typically what phpmyadmi does to limit the length of result pages).

This is not applicable for a count (which will always output one single row), so using limit in this case is not proper syntax.

I don't understand how it could be possible that you got a different result when removing the "limit" part of your query. It shouldn't.


Le 30 mai 2012 à 01:10, InuYasha Meiji a écrit :

> Actually, I am not an expert at php.  I have only just started to learn a bit of it.  To come up with the correct line of code, I used phpmyadmin.  I went to the griduser field, and used the search on the online field, within it, for matches for all that was equal to TRUE.
> 
> When I saw that when my avatar was on, and it showed my UUID key griduser had a TRUE in the Online field, I used the button available in  phpmyadmin for convert my question into php.   I copied it to a note card, with limit 0,30 included.  Since the command was already there, it worked I wasn't going to mess with it.,
> 
> Once I got the actual php request written, in a way that Nabadon's php would accept it.  It took replacing a few " chracters and the like.  It seemed to fix the issues.  I ran a test to be sure.  With the LIMIT 0,30 in the command I get a correct number of users.  I logged in my own, my wife's and my friend's avatar and it gave the correct number of three users online.
> 
> When I was the only one logged in and took out the LIMIT 0,30 it incorrectly reported 7.
> 
> I am not sure that the limit function in this case dose what we thought.  It might be the spot in the row of data it looks for the TRUE you're looking for.
> 
> I got desperate, had no help coming with this as far as I knew, so I decided to try something a little nuts.  and it seems to work.  Now to get al this to display in  a web page besides the gridstats.php.
> 
> P.S. I am close, just a few little things to line up.
> 
> InuYasha
> 
> 
> On 5/29/2012 7:47 AM, Klaus-E. Klingner wrote:
>> Hallo,
>> 
>> why are you using LIMIT 0, 30 ? That would display max of 30 entries? Or am I wrong?
>> 
>> Regards,
>> 
>> SilverDay
>> 
>> On 29.05.2012 12:08, InuYasha Meiji wrote:
>>> Hey Nebadon, I fixed the php but not yet the html.  It still don't
>>> want to display the info.  But the php now accesses the new 7.3.1
>>> database and finds the online users by replacing the lines just below
>>> this:
>>> 
>>> 
>>> 
>>> // Query the database and get the count
>>> 
>>> $result1 = mysql_query("SELECT COUNT(*) FROM griduser WHERE Online
>>> LIKE 'TRUE' LIMIT 0, 30 ");
>>> list($totalUsers) = mysql_fetch_row($result1);
>>> 
>>> 
>>> 
>>> 
>>> This correction will show users online.
>>> Thanks for the original code.
>>> 
>>> InuYasha
>>> 
>>> 
>>> 
>>> -------------------------------------------------------------------------------------------------------- 
>>> On 5/23/2012 4:23 PM, Nebadon Izumi wrote:
>>> some of the statistics stuff OSgrid uses is here :
>>> 
>>> https://github.com/nebadon2025/opensimulator-splash-screen
>>> 
>>> and could pretty easily be adapted into any page on any website package.
>> 
>> _______________________________________________
>> Opensim-users mailing list
>> Opensim-users at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>> 
> 
> 
> -- 
> ________________________________________________________________
> Opensim User: Standalone Grid on Version 0.7.3.1 with 56 Regions
> on Windows 7, 64-bit. Phenom 9500 2.2 ghz Quad Core, Terabyte Hard
> Drive, 8gig DDR2 RAM.  Used XAMPP to load PHP Version 5.3.0, Apache
> and MySQL 5.1.41-community edition.  Groups, Profiles, Voice and
> Offline Mesages all working. (Not yet Public, 6 users allowed Now).
> ________________________________________________________________
> 
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users




More information about the Opensim-users mailing list