shazi - 2009-07-11 16:04:10
<?php
$q = $_GET['q'];
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database", $con);
$result = mysql_query("SELECT * FROM tbtest
WHERE text_cat='" . $q . "' LIMIT '4' '1'");
while($row = mysql_fetch_array($result))
{
echo $row['user_name'] . "<br>" . $row['text_data'];
echo "<br /><hr>";
}
?>
how can i prevent the duplicate records in this script ...
or any one have another idea toprevent duplicate records