re: parallel execution of code
| From: | (hope) | Date: | Tue, 09 Aug 2005 10:33:00 +0000 |
| Subject: | re: parallel execution of code | ||
| Groups: | php.general php.general php.general | ||
| Request: | Send a blank email to php-general+get-220276@lists.php.net to get a copy of this message | ||
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 }