Jump to content

How to get more than one result


Recommended Posts

Ok im trying to create a spawn system using SQLite.

Creating the table

  
executeSQLCreateTable ( "Spawn", "name TEXT, gang TEXT, city TEXT, type TEXT, x REAL, y REAL, z REAL, wep1 INTEGER, wep2 INTEGER, wep3 INTEGER, wep4 INTEGER, wep5 INTEGER, wep6 INTEGER, skin1 INTEGER, skin2 INTEGER, skin3 INTEGER") 

Now is this how i would get all the results from each field of the table?

GetSpawns = executeSQLSelect ( "Spawn", "*") 

Link to comment

here's a preview:

table = executeSQLQuery("SELECT * FROM Spawn") 
--[[ table = { 
    { colname1=value1, colname2=value2, ... }, 
    { colname1=value3, colname2=value4, ... }, 
    ... 
    } 
]] 
  
|name|gang|city|type|x|y|z|wep1|wep2|wep3|wep4|wep5|wep6|skin1|skin2|skin3| 
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | 
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...