SQL Lite

Hey guys I got a question.
If i got a table on mysqlite and i want to select all of the information from the colums that thier steamid value is a steamid, how would i do that?
i got this until now, but dont know how to return the information of each
local q = "Select * FROM warning_system WHERE SteamID = "… SQLStr(steamid)
local queries = sql.Query(q)

[lua]
local data = sql.Query(“SELECT foo, bar, baz FROM foosball WHERE steamid = '” … SQLStr(steamid) … “’”)
for k, row in pairs(data) do
print(row.foo, row.bar, row.baz)
end
[/lua]

SQLStr(str) already adds the quotes, so there is no need to add them in the query.

I got an error saying:
bad argument #1 to ‘pairs’ (table expected, got boolean)
it points on the for loop.
This is my query:
local data = sql.Query(“SELECT * FROM warning_system WHERE SteamID = '” … SQLStr(calling_ply:SteamID()) … “’”)

[LUA]
local data = sql.Query("SELECT * FROM warning_system WHERE SteamID = " … SQLStr(calling_ply:SteamID()))
for k, row in pairs(data) do
– do stuff
end
[/LUA]
That is the correct code

whoops

i haven’t used SQLStr in years, it had/has some problems escaping things sometimes

same error, i tried printing it and it came out as false.

Then that table probably doesn’t exist.
Try printing the last error using
sql.LastError()

ok fixed.
Got a problem a new problem now.
I am using this query:
SELECT COUNT(*) FROM warning_system WHERE SteamID = ‘STEAM_0:0:43447569’
and getting this error:
near “:0”: syntax error

Show us your code.
It’s probably related to the steamid not being quoted properly.