If my user wants to print a printer-friendly report, then I need to run through my database a second time. I use the one script to build my sql statement (I go through this once) and then use the same script to build the actual report on either page (possibly go through this twice). If I put this statement:
mysql_free_result($result);
just before this statement:
$result = mysql_query($sql,$dblink) or die("Couldn't execute query\n");
will this cause any problems the first time through when $result is empty?