May 28 2008

SQL select from two tables with the same field name

Tag: ubuntutengo @ 9:15 am

Running MySQL and doing join’ed queries you might run into problems when you try to get results from two tables into one results set, where both tables have a field that is identically named (common with id-fields). For example:
SELECT table1.id, table1.fieldA, table1.fieldB, table2.id, table2.fieldC, table2.fieldD
FROM `table1`,`table2`
WHERE table1.fieldA = ‘test’
AND table1.id = table2.fieldD;
Here […]


May 04 2008

Subversion: checkout a specific version

Tag: ubuntutengo @ 10:38 am

Here is how to checkout a specific revision from a subversion (svn) controlled project (use the “-r” option):
svn checkout -r <revision number>
This can be handy in case you use subversion in a production environment, where having the latest version is less important than having a version you know and can rely on.