Kieran-R Posted October 17, 2010 Share Posted October 17, 2010 Hello. Is there suck a thing that you could add to you script that you could block certain MySQL querys from other parts of your script? I know this sound stupid, but its linking to Players disappearing? Here's why!. ANd I cant seem to find where in my script this is. Probally sounds stupid, but just delete this thread if there is no suck thing ;( Quote Link to comment Share on other sites More sharing options...
Equinox Posted October 17, 2010 Share Posted October 17, 2010 I don't get what you're saying...? Someone on your site(game?) has changed their name or put something somewhere that links to here....? It's not a MySQL query, If I think I understand what you're saying.... Quote Link to comment Share on other sites More sharing options...
Dominion Posted October 17, 2010 Share Posted October 17, 2010 are you saying someone added a meta refresh to you're logins description? Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted October 17, 2010 Author Share Posted October 17, 2010 nonnono Im saying, my game has about 1 million files, and I dont have the patience to look through everyone of them for delete user querys. i want to put some sort of php script that will block any of the specified MySQl querys from running. A bit strange, yea i know XD Quote Link to comment Share on other sites More sharing options...
Dominion Posted October 17, 2010 Share Posted October 17, 2010 well look at the file, find the query,take it out... don't be lazy Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted October 17, 2010 Author Share Posted October 17, 2010 trust me. You would be here for lots of hours looking through all my files. It doenst matter if tehres no such thing. Guess ill just have to do it :( Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted October 18, 2010 Share Posted October 18, 2010 1 mil files? Hahaha sure sure... And no there is no way to block on a certain type of query... however there is a little tool called grep which could be useful ;) Quote Link to comment Share on other sites More sharing options...
Dayo Posted October 18, 2010 Share Posted October 18, 2010 if you are realy desperate go into cpanel and change your mysql privs to everything but delete also look for any sql injections and throgh error logs Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted October 18, 2010 Author Share Posted October 18, 2010 But wouldnt that block lots of essential things in the game? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted October 18, 2010 Share Posted October 18, 2010 Quiet certainly yes. Quote Link to comment Share on other sites More sharing options...
Dayo Posted October 18, 2010 Share Posted October 18, 2010 well i usuly never delete any data unless i have to ... i do this by adding a field in the table called deleted and in the query i add AND `deleted`=0 and if you want it not visable you udate it to 1. you have to weigh the pros and cons do you want your userbase deleted or a few more rows in your tables Quote Link to comment Share on other sites More sharing options...
bluegman991 Posted October 18, 2010 Share Posted October 18, 2010 if u have a mysql class u could either filter any query's that have delete in them and add what they've delete along with the page where it was executed from to another table. then just look for the magic query and... u got the page that was doing it. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted October 19, 2010 Share Posted October 19, 2010 I'm not going to lie, yes it could be done - to write an piece of code that will prevent certain mysql queries(using an pattern based search). I would rather just suggest setting the correct permissions for your mysql user and the database it is connecting to. Other than that, just make sure your own queries you pass to the database is solid and not able to flex via some sort of script malfunction(aka. a bug or loophole). 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.