robert_gsfame Posted April 5, 2011 Share Posted April 5, 2011 SELECT * FROM `table1` VS SELECT * FROM table1 Which one is the best one to be used? n what is the difference? Is using backticks can prevent me from sql injection which means better to use?? thx in advance Quote Link to comment https://forums.phpfreaks.com/topic/232733-backticks-simple-question/ Share on other sites More sharing options...
gizmola Posted April 5, 2011 Share Posted April 5, 2011 No, the backticks have nothing to do with sql injections. They simply insure that mysql doesn't confuse table or column names with reserved words, allowing you to do things like name columns "order" or a table "select". Not that these are good ideas by any means, but it does allow you to get away with those types of things. Quote Link to comment https://forums.phpfreaks.com/topic/232733-backticks-simple-question/#findComment-1197069 Share on other sites More sharing options...
robert_gsfame Posted April 5, 2011 Author Share Posted April 5, 2011 okay.....thx a lot Quote Link to comment https://forums.phpfreaks.com/topic/232733-backticks-simple-question/#findComment-1197072 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.