PatPeter SQL library for other DB Engines

Discussion in 'Plugin Development' started by skipperguy12, Jun 26, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    skipperguy12

    Hello! Me and my friend were making a little server network. We're both coming from SQL, and know almost nothing of Mongo, well... I don't.

    He's designing the site, and I'm getting my plugins ready in case we suddenly switch, so I can change 1 or 2 things and get it ready for Mongo. To do this I used my config and PatPeter's SQL Library, but now, can someone give an example of how a query to check if a user exists? I know this is a horrible way of learning, because I'll only learn sections of it, but if anyone can show me a simple query or 2.

    Also, how would we make a script or something to transfer all our SQL data to MongoDB data? We don't have any data to transfer/convert yet, but if we start out with SQL, will it be impossible to move to Mongo?

    Here is the query I need to see how it will look in Mongo:
    SELECT * FROM users WHERE username='" + name + "'


    One more thing, would I use the same method in the library to do a mongo query as I would for a MySql query? Here's MySql: db.query(query), is it the same for Mongo?

    Bump

    Only 8 views? :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
Thread Status:
Not open for further replies.

Share This Page