[Solved] How to cancel action when detect same line in MySQL [closed]
from my understanding of your question – in your php code you can do something like this <?php $con=mysqli_connect(“localhost”,”my_user”,”my_password”,”my_db”); $sqlSearch = “select everything from <table_name> where <column_name> = <value>;”; $result = mysqli_query($con,$sqlSearch ); if (mysqli_num_rows($result) > 0){ // do nothing } else{ $sqlInsert = “insert into <table_name> (column1,column2…) VALUES(value1,value2…);”; $result = mysqli_query($con,$sqlInsert); } ?> basically, … Read more