Optimising this PHP/MySQLi code?

Printable View