troubleshooting Question

check mysql insert

Avatar of James Murrell
James MurrellFlag for United Kingdom of Great Britain and Northern Ireland asked on
12 Comments4 Solutions308 ViewsLast Modified:
i have this insert


$ud_ID = $_SESSION['submissionID'];
$circuitId= mysql_real_escape_string($_POST['circuitId']);

    $query="INSERT INTO perrace(perraceid, SubmissionId, Race, Driver1, Driver2, time_updated, updated_dt) VALUES ('', '$ud_ID','$Race1','$first','$second','CURDATE()','')";

mysql_query($query)or die(mysql_error());
    echo "<p>$TeamName Your options have been updated please login again to see <p>";

    echo "<p><b><a href='../log.php'>Login</a></b></p>"; 
    echo "<p>Sorry $TeamName Sorry nothing was updated<p>";

what i would love is for it to check that race and submissionID is not already in database

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 4 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros