Make sure you use trim($email_address) to create the field to insert into the database !
Check the actual string you get returned from the query on the DB with the query
SELECT * FROM mailinglist WHERE email like '$email%'
Use strlen($resul["email"]); and you'll see that the length of the email address is not the same as the number of characters in the email address if you count them manually.
Cheers - Neil
At 11:54 13/11/2004 +0000, you wrote:
I search the list like so:
$email="someone@xxxxxxxxxxx"; $query=mysqli_query($cnn,"SELECT * FROM mailinglist WHERE email='$email'");
When I do:
Echo mysqli_num_rows($query);
I get 0 back, The address I am searching is in the database, I have triple checked it with phpmyadmin. The only way I can get it to return the record I am looking for is to do this.
$email="someone@xxxxxxxxxxx"; $query=mysqli_query($cnn,"SELECT * FROM mailinglist WHERE email like '$email%'");
Then this finally returns 1. I have tried many different email addresses; nothing comes back, not even from the SQL query window within phpmyadmin v. 2.6.0-rc2
This has been puzzling me for hours on end. If anyone can provide any help, that would be great
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php