CosminStan Posted November 14, 2012 Share Posted November 14, 2012 Hello guys, i have a problem foreach($liga1 as $item) { $titlu = $item->get_title(); $link = $item->get_permalink(); $text = $item->get_description(); $data = $item->get_date('j M Y, g:i a'); $titlu = mysql_real_escape_string($titlu); $link = mysql_real_escape_string($link); $text = mysql_real_escape_string($text); $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die(mysql_error()); } mysql_select_db($dbname, $con); $sql = "REPLACE INTO stiri (id, titlu, continut, link, categorie, data) VALUES ('','$titlu','$text','$link','Liga 1','$data')"; mysql_query($sql); mysql_close($con);} So.. every time i run this script i get duplicate items in my db.. i tried with md5 but i get a timeout error, i set the limit but the tables aren't update. Link to comment Share on other sites More sharing options...
Barand Posted November 14, 2012 Share Posted November 14, 2012 CosminStan - you have already posted this in the MYSQL forum and received an answer. DON'T double post it here and waste everyone's time by asking them to answer it again. Link to comment Share on other sites More sharing options...
Recommended Posts