$result = mysql_query("SELECT * FROM subjects", $connection);
while($row = mysql_fetch_array($result){
//do something with the rows }
or should I only use mysql to ONLY get the rows that I need to use?
It seems a bit wasteful to get all of the fields/rows when I'm only going to using some of them but if it makes no difference to the server cpu or bandwidth and also if it's what most people (rightly) do then it's ok?
Yep, it's always better to optimize your queries to only fetch info you'll actually use. SQL queries are likely to be the bottleneck in most systems.
Instead of using select *, only get columns you need. If you only need users registered after a certain date for example, only fetch those using a where clause in your SQL statement.