Jump to content

[SOLVED] Simple MySQL problem


Perad

Recommended Posts

This is to check if the user Alias is already taken. However if the name is in there or not it still returns the error saying it is. What can i change so it only flags up when the user actually isn't in there.

 

$sql="SELECT * FROM blog_members WHERE user_alias='$this->userAlias'";
$result = mysql_query($sql);
if ($result) {
echo " - Error 5005 - This username is taken!";
$this->error[] = 1;
}

Link to comment
https://forums.phpfreaks.com/topic/49667-solved-simple-mysql-problem/
Share on other sites

Archived

This topic is now archived and is 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.