Jump to content

Delete A SQL Table


Recommended Posts

Posted

Well Im Tryin To Use A Command To Delete A SQL Table I Know I Can Delete THough PHP MyAdmin But This Is Incase Something Happens

function delsql() 
    executeSQLDelete("testtable") 
end 
addCommandHandler("deltable", delsql) 

The Script Is Server

Posted (edited)
@@Kenix, that's SQLite xD
executeSQLQuery ( "DROP TABLE testtable" ); 

Edit: Ok, you changed already.. Anyway, you don't need `` in SQLite.

Doing That Doesnt Work It Says The Table Dont Exist And I DOnt MEan Sqlite I Mean The SQL You Get With XAMPP

Edited by Guest
Posted (edited)
@@Kenix, that's SQLite xD
executeSQLQuery ( "DROP TABLE testtable" ); 

Edit: Ok, you changed already.. Anyway, you don't need `` in SQLite.

Doing That Doesnt Work It Says The Table Dont Exist And I DOnt MEan Sqlite I Mean The SQL You Get With XAMPP

I Mean The SQL You Get With XAMPP

That's MySQL xD

Edited by Guest
Posted (edited)

My bad:/

I didn't read first post better.

Your table not exists in registry.db ( all executeSQL .. functions working only with registry.db )

Also in XAMPP included

Apache

MySQL

PHP

Perl.

Where you see sqlite? You working with mysql ...

So use this functions:

https://wiki.multitheftauto.com/wiki/DbConnect

https://wiki.multitheftauto.com/wiki/DbExec

https://wiki.multitheftauto.com/wiki/DestroyElement

Edited by Guest
Posted

I actually recommend to use the built-on (My)SQL functions

dbConnect 
dbExec 
dbQuery 
dbPoll 
dbFree 

To drop a MySQL table you can do this:

dbExec ( handler, "DROP TABLE `myTable`" ) 

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...