Jump to content

Php Function To Sort Mysql Duplicates


CosminStan

Recommended Posts

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.