Hello,

I have this code:

 // insert new user in mysql user table
  $sqlInsertUser = "INSERT INTO user (Host, User , Password ,
Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('$hostname',
'$mysql_username', '$mysql_password', 'N', 'N', 'N', 'N')";

  if (mysql_query($sqlInsertUser, $conn))
   $messagesqlInsertUser = 'Success...';
  else
   $messagesqlInsertUser = 'Error: ' . mysql_error();
  $result = mysql_query($sqlInsertUser);

that gives me the error:
"Error: Duplicate entry 'localhost-' for key 1"

I can't see nothing wrong with it and if i run it in MySQL's prompt
everything's fine.

Any ideas ?

Besta Regards,
Deckard.

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

Reply via email to