drisate Posted January 20, 2017 Share Posted January 20, 2017 (edited) Hey guys I am testing a query that returns:function is called Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097160 bytes)now i know i can change the memory limit ... but I would prefer optimizing the query instead.select * from devices where hardware_id=(select hardware_id from (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME ='hardware_id' order by TABLE_NAME asc limit 1) as T where hardware_id!='' order by id asc limit 1)Is there a better way of searching for hardware_id in the first found table that contains them? I tryed adding the limit 1 param in both sub query's ... but that did not change the allowed memory error.I wish i had the database table structure but I am flying blind ...Thx in adavnce Edited January 20, 2017 by drisate Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted January 20, 2017 Share Posted January 20, 2017 Um, what? You obviously have some form of server access, so what exactly prevents you from actually learning the database structure? Quote Link to comment Share on other sites More sharing options...
drisate Posted January 21, 2017 Author Share Posted January 21, 2017 It's actually complicated ... we own the website but not the DB and that makes it hard for us to develop any new features. They want us to hire them ... Just trying to show my boss we can manage with out them lol Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted January 21, 2017 Share Posted January 21, 2017 (edited) With attempts like this, you're just making a fool of yourself. And the queries are so hopelessly wrong that you'll sooner or later have to write them all over again. So you have shell access to your server containing the PHP application, right? And the application obviously contains the database credentials. Extract them, connect to the database and start digging. If the database is publicly reachable, you can even use your favorite admin GUI on your PC. Edited January 21, 2017 by Jacques1 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.