micheal1230 Posted April 18, 2012 Posted April 18, 2012 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
Kenix Posted April 18, 2012 Posted April 18, 2012 executeSQLQuery( "DROP TABLE `testtable`" ) or executeSQLDropTable( "testtable" ) Updated.
Michael# Posted April 18, 2012 Posted April 18, 2012 @@Kenix, that's SQLite executeSQLQuery ( "DROP TABLE testtable" ); Edit: Ok, you changed already.. Anyway, you don't need `` in SQLite.
Kenix Posted April 18, 2012 Posted April 18, 2012 Edit: Ok, you changed already.. Anyway, you don't need `` in SQLite. Lolwhat
micheal1230 Posted April 18, 2012 Author Posted April 18, 2012 (edited) @@Kenix, that's SQLite 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 April 18, 2012 by Guest
Michael# Posted April 18, 2012 Posted April 18, 2012 (edited) @@Kenix, that's SQLite 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 Edited April 18, 2012 by Guest
Kenix Posted April 18, 2012 Posted April 18, 2012 (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 April 18, 2012 by Guest
micheal1230 Posted April 18, 2012 Author Posted April 18, 2012 Check your table in PMA. I Know Its There Cuz I Created It, It Is There
Michael# Posted April 18, 2012 Posted April 18, 2012 You must create the table in phpMyAdmin and install mysql module. Then, use mysql_connect to connect to the database and mysql_query to manage. https://wiki.multitheftauto.com/wiki/Mysql
micheal1230 Posted April 18, 2012 Author Posted April 18, 2012 You must create the table in phpMyAdmin and install mysql module.Then, use mysql_connect to connect to the database and mysql_query to manage. https://wiki.multitheftauto.com/wiki/Mysql Lol Guys I Done All This Shit i have xampp a successful LOCAL rp server
Castillo Posted April 18, 2012 Posted April 18, 2012 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`" )
Kenix Posted April 18, 2012 Posted April 18, 2012 He need use only ( for delete table ) So use this functions:https://wiki.multitheftauto.com/wiki/DbConnect https://wiki.multitheftauto.com/wiki/DbExec https://wiki.multitheftauto.com/wiki/DestroyElement local uConnection = dbConnect( -- arguments here ) -- connect to db dbExec ( uConnection, "DROP TABLE `testtable`" ) -- request destroyElement( uConnection ) -- close connection
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now