M.O.S. Studios Posted June 25, 2009 Share Posted June 25, 2009 hey, I want to remove the `index` column from the `storeinfo` table in the results of a mysql query any one know the prober syntax??? here is the code on the bottom? SELECT `emails`.`New orders` , `settings`.`site_folder` , `storeinfo` . * FROM `emails` , `settings` ,`storeinfo` thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/163690-solved-exclude-row/ Share on other sites More sharing options...
pkedpker Posted June 25, 2009 Share Posted June 25, 2009 `storeinfo` . * * means it will select ALL... if you don't want index it it.. then don't use the *. instead do like.. `storeinfo` . something, `storeinfo` . something2, `storeinfo` . something3.. but you see doing it your way just to get rid of index.. is soo much longer.. and worse Quote Link to comment https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-863751 Share on other sites More sharing options...
M.O.S. Studios Posted June 25, 2009 Author Share Posted June 25, 2009 its not that big a deal, i will just live having the index in there. thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-863753 Share on other sites More sharing options...
Maq Posted June 25, 2009 Share Posted June 25, 2009 its not that big a deal, i will just live having the index in there. thanks a lot It is bad practice to use SELECT * unless you need all of the fields. Using * instead of listing just the required columns is not only inefficient, it also impacts the reliability and maintainability of your code. Just list the columns you want, it's not difficult. Quote Link to comment https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-863757 Share on other sites More sharing options...
M.O.S. Studios Posted June 29, 2009 Author Share Posted June 29, 2009 I agree, which is why i asked the question, however in this case its only one column i don't need, so i think it will be fine Quote Link to comment https://forums.phpfreaks.com/topic/163690-solved-exclude-row/#findComment-866020 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.