i have a query line, so it's going to add all the users who have submitted results into a table. how do i change this so only one userid will add???
currently is userid 3 has added 4 results into tippingresults they will have 3 rows in tippingtable, i want just one row... how can this be done?
$result2 = mysql_query ("SELECT * from tippingresults where compid = '$compid'");
while ($row2 = mysql_fetch_array($result2)) {
$uid = $row2[userid];
$result9 = mysql_query ("INSERT INTO tippingtable (`comp_id`,`userid`,`correct`,`close`,`total`) Values ('$compid','$uid','0','0','0')") or die("INSERT error: ".mysql_error());
}