PDA

View Full Version : Help wanted with Manual SQL Query


Aneurysm
07-03-2007, 09:52 PM
Does anyone have a link to a good guide/tutorial for Manual SQL queries?

I would like a reference to learn from but my specific problem is with yahoo and aol thinking that everything is SPAM so what I want to do is turn off admin emails and subscription emails to all @aol and @yahoo addresses. Also is there a wildcard I can use to get all the Yahoo addresses at the same time (.com .fr. uk etc...)

Eikinskjaldi
07-04-2007, 12:44 AM
Does anyone have a link to a good guide/tutorial for Manual SQL queries?

I would like a reference to learn from but my specific problem is with yahoo and aol thinking that everything is SPAM so what I want to do is turn off admin emails and subscription emails to all @aol and @yahoo addresses. Also is there a wildcard I can use to get all the Yahoo addresses at the same time (.com .fr. uk etc...)

You really cannot go past the mysql documentation
http://dev.mysql.com/doc/refman/5.0/en/index.html

as for your specific question, mysql supports a regex search, but you can get away with using like

select userid from user where email not like '%yahoo%';


As to where in the the code you put the check...that would take some hunting around.