pcristian43 Posted December 13, 2014 Share Posted December 13, 2014 I was thinking of adding queries using a basic HTML form. To be able to do that I was thinking of having a Query sql table which has all the main create, insert, remove, update, delete and select general syntax into it. The idea is to be able to choose a query based on a HTML select option and add the values to a field, any idea how can you do that dynamically? Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted December 13, 2014 Share Posted December 13, 2014 This sounds super-weird and super-dangerous. If the query table gets compromised, you've just turned your entire application into a kind of phpmyadmin for hackers. What are trying to achieve? I mean the underlying problem, not what you think solves it. Do you want to build a database administration tool? Or do you simply want users to change data? Quote Link to comment Share on other sites More sharing options...
pcristian43 Posted December 13, 2014 Author Share Posted December 13, 2014 This sounds super-weird and super-dangerous. If the query table gets compromised, you've just turned your entire application into a kind of phpmyadmin for hackers. What are trying to achieve? I mean the underlying problem, not what you think solves it. Do you want to build a database administration tool? Or do you simply want users to change data? I am trying to build a sql administration app, I know there are some out there but I wanna sharpen my skills. Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted December 13, 2014 Share Posted December 13, 2014 You could start by finding all the databases,tables,columns. SHOW DATABASES SHOW TABLES SHOW COLUMNS Loop each to get all the results, easier to make functions for them. Do normal queries using the data you discovered. Quote Link to comment Share on other sites More sharing options...
Barand Posted December 13, 2014 Share Posted December 13, 2014 Following on from what QuickOldCar said, here's some code I put together many months ago. It should get you started. dbAdmin.php dbAdmin_ajax_c.php dbAdmin_ajax_p.php dbAdmin_ajax_t.php Quote Link to comment Share on other sites More sharing options...
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.