php mysql query looping too many times on page load?? -
i running query "forename" , "surname" of "manager" in mysql below - query works fine in mysql when test (it returns 1 result) when page loads on browser name appears more 10,000 times! not sure doing wrong - appreciated, thankyou. <div id=""> <? $query3 = "select * `lf`.`weekly_report` inner join `lf`.`user_account` on `lf`.`weekly_report`.`manager` = `lf`.`user_account`.`user_id` (date >= curdate( ) - interval dayofweek( curdate( ) ) +6 day) , (date < curdate( ) - interval dayofweek( curdate( ) ) -1 day) , `p_code` = '" . $pcode . "'"; echo "<table border=1 cellpadding=5 width=30% style='border-collapse:collapse; height:auto; font-size:small; float:left;'>"; echo "<tr>"; echo "<th style='background-color:#ffffcc;'>project manager</th>"; while ($row2 =...