1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

MySQLOO and SQLLite

Discussion in 'Discussion' started by kurozael, Oct 20, 2014.

  1. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Yo guys. So I've done some database stuff for Clockwork.

    If you leave the MySQL config to be default (example.com), Clockwork will use a local database. This means now you can have Clockwork servers without an external MySQL database if you want - which means no additional setup when first installing.

    If you wish to use a MySQL database, you can enter your details as normal and Clockwork will first try to use MySQLOO if it is loaded and installed, otherwise it will try to use tmysql4.

    https://github.com/CloudSixteen/Clockwork
     
  2. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    (Also this should have fixed that character creation issue on Linux, I'm hoping.)
     
  3. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

    Woo, I'm still probably going to use external databases though, as using phpmyadmin to manage things will work well.


    Also any way any integral support may be added for plugins that require database info?
     
  4. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Plugins can just use the Clockwork.database library. Clockwork.database:Query(query, function(data, lastInsertId) end) is all you need.

    Internally this just performs that query on whatever database the server is connected to it, whether it be SQLLite, MySQLOO, or tmysql4.
     
  5. duck

    duck Phant0m Legend

    Plugins already have access to the database info

    Code:
    local sqlHost = Clockwork.config:Get("mysql_host"):Get();
    They also have access to Clockwork.database, which allows for queries to be ran without messing with any of the info.
     
  6. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

    I mean like web stuff

    like truascalz roster
     
  7. duck

    duck Phant0m Legend

    That's a PHP project. What exactly are you proposing?
     
  8. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

    dunno his stuff seems to require database stufff, and probably wont accept example.com stuff

    stuff like his combine report console aswell, requires it.
     
  9. duck

    duck Phant0m Legend

    It should accept domain names, and if it requires database info, then you need to take your database info and put it in whatever file it gets the information from.
     
  10. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

    I mean for mysqllite.

    How would php stuff get the info from it?
     
  11. duck

    duck Phant0m Legend

    I didn't know you meant lite ::)
     
  12. Devul

    Devul Oh Hai

    You won't, because it's hosted in the sv.db in garrysmod, i think.
     
  13. alexanderk

    alexanderk a Legend

    If you want it to be able to interact with sqlite, you'll have to host the website and stuff on the same server
     
  14. Hoonigan

    Hoonigan The giver of Le Box Rating. Clockwork Customer

    This is amazing local SQL capability, this will axe the installation time now.
     
  15. trurascalz

    trurascalz C16 Developer Legend

    Aye pretty much impossible to do if you use sqlite. It could be done with rcon and all this crap but im not going to lel.

    But finally sqlite compatability.
     
  16. duck

    duck Phant0m Legend

    Export the database, convert to MySQL format, and then use MySQL. That's the only thing I can think of.
     

Previous Readers (Total: 0)