Press "Enter" to skip to content

Posts published in December 2011

SELECT Duplicate Items Using SQL

If you have a table which has duplicate items in then you can use the below statement to select them. [code lang=”sql”] SELECT * FROM tableName GROUP BY columnName HAVING ( COUNT( columnName) >1 ) [/code]

MySQL Error: Can't get hostname for your address

This error is thrown by MySQL because it tries to do a DNS lookup on the address connecting to the server and it fails due to the IP not being able to be resolved back to a name or some-other deeper DNS bust problem. The easiest way to fix this…