#Al-Ha[J]aRii Posted June 17, 2013 Author Share Posted June 17, 2013 Doesn't matter it's both . addEventHandler('onResourceStart',getResourceRootElement ( getThisResource ( ) ), function ( ) executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS `Like UnLike System` ( MyCoulmn[1],MyCoulmn[2],MyCoulmn[3] )' ) end ) You can add \ remove column . wil remove with ? I saw no sql lite function remove column just row . Link to comment
iPrestege Posted June 17, 2013 Share Posted June 17, 2013 You can remove it yes and add the column as what you want . Link to comment
#Al-Ha[J]aRii Posted June 17, 2013 Author Share Posted June 17, 2013 You can remove it yes and add the column as what you want . addEventHandler('onResourceStart',getResourceRootElement ( getThisResource ( ) ), function ( ) executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS `Like UnLike System` ( PlayerName,MyCoulmn[2],MyCoulmn[3] )' ) end ) ------------------------------------------------------------------------------------------------------------ function Results() local Results = executeSQLQuery("SELECT * FROM `Like UnLike System` WHERE PlayerName=?",getPlayerName ( name ) ) if ( Results == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `Like UnLike System` ( PlayerName,MyCoulmn[1],MyCoulmn[2] ) VALUES(?,?,?,?)",getPlayerName(name)) else executeSQLQuery('UPDATE `Like UnLike System` SET MyCoulmn[1], MyCoulmn[2] PlayerName =?',?,?,getPlayerName(name)) end end addEvent("gResults",true) addEventHandler("gResults",root,Results) can I keep it's with [ ? ] ? Link to comment
iPrestege Posted June 17, 2013 Share Posted June 17, 2013 You're insert and get results from a doesn't exists columns . Link to comment
#Al-Ha[J]aRii Posted June 18, 2013 Author Share Posted June 18, 2013 executeSQLQuery ( "INSERT INTO `xAlhajarii` ( PlayerName ) VALUES(?)",getPlayerName(name)) wil insert be like this ? Link to comment
Castillo Posted June 18, 2013 Share Posted June 18, 2013 I don't think you defined 'name', use 'client'. Link to comment
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