Need Help with SQL querie returning error

Hey guys I’m having a problem with SQL queries

i have this code:

sql.Query("SELECT hp FROM hp_data WHERE steam =  '"..ply:SteamID().."';")

This is the error I get:

"attempt to concatenate a table value"

My table looks like this:

The table is called hp_data

| steam | hp | money |
1|STEAM:0_0_0 | 100 | 500 |

What can I do to make “sql.Query(“SELECT hp FROM hp_data WHERE steam = '”…ply:SteamID()…”’;")" return 100 ?
Thanks for reading :slight_smile:

bump so every one can see it, No ideas guys? I tried table.ToString but i can’t get the hp every time because the value can change from xxx to xx to x, so its hard to select the right character limit

Actually this solved my problem: