U might try omthing like this::

$query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";

$result = mysql_query($query, $cnn) or die(mysql_error());
                                        
$totalRows_result = mysql_num_rows($result);
                                                
if($totalRows_result>0) {
      //display error tht id already exists
}
else
{

  //insert code goes here
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to