How to validate e-mail address in MySQL

Most people validate e-mail addresses in a normal programming language, such as PHP and that is a very good idea when you process user input and such, however sometimes you want to validate data already entered in a database. Take this example: you have a comments table where each person can enter an e-mail address, [...]



How to make multiple updates using a single query in MySQL

As you might know it’s quite easy to make multiple INSERTs in a single query, like this: INSERT INTO mytable (id, title) VALUES (’1′, ‘Lord of the Rings’), (’2′, ‘Harry Potter’); However, for some strange reason you can’t do multiple changes to a table in a single UPDATE query like this: UPDATE mytable SET (title=’Great [...]



How to crash IE6 with one line

Hamachiya2 found out a way to crash Internet Explorer 6 (and on some systems even the entire operating system). <style>*{position:relative}</style><table><input></table> A simple line (which you can test it here) – no one figured out why caused an exception in mshtml.dll (and knowing Microsoft we’re most likely never going to find out the answer to that). [...]