Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

sql

edited July 2005 in Vanilla 1.0 Help
i have a feeling this will probably need to wait until the documentation is more, um, filling... what is the proper(tm) method for executing an sql query within vanilla extensions?

Comments

  • MarkMark Vanilla Staff
    edited July 2005
    I don't have time to explain this one. You'll have to wait for the documentation. I will write another big part of it tonight. for the record, what are you trying to select? There are already a lot of different queries in the data objects that might work for you...
  • not to be too specific, but SELECT `UserID`,`Name` FROM `LUM_User` WHERE 1 AND `DateLastActive` >= (CURDATE() - INTERVAL 60 SECOND) and i figured this would be a documentation question. your code is so thick, it's amazing.
  • whats the WHERE 1 for?
  • that wasn't supposed to actually be part of the query, it's just an artifact from phpmyadmin so... SELECT `UserID`,`Name` FROM `LUM_User` WHERE `DateLastActive` >= (CURDATE() - INTERVAL 60 SECOND) ... which will give a list of users active in the last 60 seconds. of course, this needs refinement and additional code, and of course, the obligitory phantom users options... i'd like to take this moment to prophesize. when the documentation explains enough for people to start writing meaningful extensions, this is going to explode. but i'm sure everyone that's here already can see that for themselves.
  • mini, he's writing a counter to see the number of currently active members :D
  • right on
  • well i'd gathered that much lech, but the 1 in the where statement was irrelevant.
  • ahh, true.
This discussion has been closed.