Simple, this is in general how things work (and don't see it as slapping down, just don't always have the time to give a more extended asnwer):
- PHP Script is run
- Logic of the script is followed
- Script will retrieve all needed information from the database and place the information in variables.
- Once all info is available, the script will evaluate a template, in which the variables get replaced by their values.
As you see a condition placed in a template, only effect what is displayed, not what is retrieved from the database.
I can't give you an alternative solution, because i never even looked into this hack. But if you want to improve performance by excluding guests, you will have to edit the PHP-script to make that it will not query the database if a guest is viewing.
|