|Pathologically Eclectic Rubbish Lister|
SQL - Subroutine always returning trueby devslashneil (Friar)
|on Jul 11, 2003 at 06:09 UTC||Need Help??|
devslashneil has asked for the wisdom of the Perl Monks concerning the following question:
I have written a subroutine to test if a user is in the database or not. It returns 1 if the user is in the database and 0 if the user is not in the database.
Here is the code i have written:
However this will always return 0 for all cases. When i remove and $row == $mid it works fine, but i need the $email and $mid to be the same. I've tried changing "==" to "eq" but that doesn't work either.
I have also tried the sql statement: SELECT S_Email,MID FROM ML_Subscribers WHERE MID = '$mid' AND S_Email = '$email' and then tested if $row is true.
None of these things worked so i am pretty stuck for ideas.
I'm sure it has to be something stupid i am over looking, i would appreciate any input.
- /dev/IT -