number 1 SELECT * FROM table1 WHERE id=1 ORDER BY name PHP: number 1 SELECT `name`,`country` FROM table1 WHERE id=1 ORDER BY name PHP: in that table, there r 12 rows. but in a page i need just two of them. im curious which one i shud use....i mean, is number2 command save some server resource & faster ?? or there's not much difference
You should also always use LIMIT 1 if you´re just searching for 1 row.. then it will stop searching on first match.. else it will search entire table even if it has the match you were searching for