I read the article about why not to use individual tables for each user. I understand why, gotcha, thanks. However what I need to do is not have duplicate entries, I need for at least my userid column to be unique.
I tried using this to validate but it is not working....
$sql_username_check = mysql_query("SELECT userid FROM User WHERE userid='$user_id'");
$username_check = mysql_num_rows($sql_username_check);
if ($username_check = 0) {
mysql_query("INSERT INTO User (userid, name)
VALUES ('$user_id', '<fb:name uid=\"$user_id\" useyou=\"false\" />')");
}
When I just use the mysql_query and none of the rest, everything works fine, but it keeps adding multiple entries.
comes with an output like this
776823045 Chuck Cagle
776823045 Chuck Cagle
See where that can be a problem when I attempt to pull information about the userid 776823045 its going to have 2 entries. All help greatly appreciated.