Bryn 0 Posted March 22, 2014 Report Share Posted March 22, 2014 Database connection works fine. INSERT, UPDATE, and SELECT work. How do you take a ubot variable and plug it into the UPDATE command? I checked the wiki and there is no example of this. Quote Link to post Share on other sites
UBotDev 276 Posted March 22, 2014 Report Share Posted March 22, 2014 In query wizard you need to enter UBot variable with curly brakcets like {#VARIABLE}. Here is an example: plugin command("DatabaseCommands.dll", "query", "SELECT * WHERE id={#VARIABLE}") 1 Quote Link to post Share on other sites
Bryn 0 Posted March 22, 2014 Author Report Share Posted March 22, 2014 Thanks, that worked great. Not sure how to edit the Wiki, but your example should be added. Quote Link to post Share on other sites
UBotDev 276 Posted March 22, 2014 Report Share Posted March 22, 2014 Thanks, that worked great. Not sure how to edit the Wiki, but your example should be added.It's not actually only related to "DatabaseCommands" but curly brackets must be used every time you wan't to use variable inside string (also in set command for example). However, I agree with your suggestion. I think more appropriate example would be with use of variable, since most users will want dynamic queries... Quote Link to post Share on other sites
Aymen 385 Posted March 22, 2014 Report Share Posted March 22, 2014 It is not recommended to edit a MySQL database directly ! can easily be hacked !i'd suggest making an API interface to talk to the database securely! Quote Link to post Share on other sites
Bot-Factory 602 Posted March 22, 2014 Report Share Posted March 22, 2014 It is not recommended to edit a MySQL database directly ! can easily be hacked !i'd suggest making an API interface to talk to the database securely! I have a php script ready (95%) to do that. It will receive commands via http post. And it's using secure session keys and identifiers. I think it will be available within the next week. Dan Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.