![]() |
|
How to insert Distinct Records OR Avoid repetition when insering values into DB - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: How to insert Distinct Records OR Avoid repetition when insering values into DB (/showthread.php?tid=6096965) |
How to insert Distinct Records OR Avoid repetition when insering values into DB - blackcoder00 - Jul 22, 2020 i have some trouble when i insert values into database the record repeats himself how can i avoid this problem guys and thank alot ps:i spend one week thinking and searching how to avoid this trouble without result ![]() PHP Code ![]() PHP Code RE: How to insert Distinct Records OR Avoid repetition when insering values into DB - BadLandChugs - Jul 22, 2020 (Jul 22, 2020 04:53 PM)blackcoder00 Wrote: i have some trouble when i insert values into database the record repeats himself how can i avoid this problem guys google works nice https://www.tutorialspoint.com/mysql/mysql-handling-duplicates.htm try it RE: How to insert Distinct Records OR Avoid repetition when insering values into DB - blackcoder00 - Jul 22, 2020 (Jul 22, 2020 04:55 PM)BadLandChugs Wrote: google works nice i didn't find anything that could help me RE: How to insert Distinct Records OR Avoid repetition when insering values into DB - Nachfolger - Jul 23, 2020 Why is your insert query in 2 loops? Post the full code, it’s hard to tell what’s even happening here. RE: How to insert Distinct Records OR Avoid repetition when insering values into DB - HFDone - Jul 23, 2020 delete foreach https://www.w3schools.com/php/php_mysql_select.asp RE: How to insert Distinct Records OR Avoid repetition when insering values into DB - blackcoder00 - Jul 23, 2020 (Jul 23, 2020 06:05 AM)HFDone Wrote: delete foreach https://www.w3schools.com/php/php_mysql_select.asp thank you bro but i solved the problem from the last night the correct code PHP Code (Jul 23, 2020 04:54 AM)Nachfolger Wrote: Why is your insert query in 2 loops? Post the full code, it’s hard to tell what’s even happening here. yeah that's why i got that problem (insert the record 4*2 ) because i have put it into two foreach loop |