Jump to content

SQL Tables.


N3xT

Recommended Posts

Posted

Hey, is it possible to add this feature, if the SQL table exists or not?

Like this.

executeSQLQuery("IS TABLE EXISTS players" )

Thanks!

  • MTA Team
Posted

You can do this:

local rows = executeSQLQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='players'")
if #rows == 1 then
  print("Exists")
else
  print("Does not exist")
end

 

  • Like 2
  • Recently Browsing   0 members

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