Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,039
    Thanks
    19
    Thanked 42 Times in 42 Posts

    mysql gone wrong again

    this time its num_rows
    PHP Code:
    $sql_email_check mysql_query("SELECT email FROM users 
                WHERE email='$email' AND status='Alive'"
    ); 
    $sql_username_check mysql_query("SELECT username FROM users 
                WHERE username='$reg_username'"
    ); 

    $email_check mysql_num_rows($sql_email_check); 
    $username_check mysql_num_rows($sql_username_check); 

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    If you added mysql error to the end of the query, you'll know what's wrong.

    PHP Code:
    $sql_username_check mysql_query("SELECT username FROM users 
                WHERE username='$reg_username'"
    ) or die(mysql_error()); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •