By Nitin on July 17, 2009
Often we need MINUS operator as defined by the SQL definitions i.e you have two sets P and Q and you want P-Q which gives all the elements in P that are not in Q. But unfortunately, MYSQL does not have any operator for such an operation (yeah, I had the same reaction when I [...]
Posted in Nitin's Blog | Tagged Intern, mysql
By Nitin on July 15, 2009
Until sometime back, I was unaware of how I could get the value of an auto-incremented field after an Insert Statement. But recently I needed it for two of my projects simultaneously, so I explored the possibilities. As one of my project is in Java and other is in PHP, we will go through both [...]
Posted in Nitin's Blog | Tagged Intern, java, mysql, php
By Nitin on July 5, 2009
Recently while working for my project, I came across this situation when I had a 2-D array and I needed to sort it twice on 2 of its columns. Consider the following 2D array: String[][] testString = new String[][] { {"1", "2", "6"}, {"4", "5", "3"} }; Sorting the above [...]
Posted in Nitin's Blog | Tagged code, Intern, java