If you make a self join, you have to give the table aliases so that mysql can distinguish between the two uses of the same table. Then the columns must be renamed as follows:
[tablename].[columnname]
You can easily make a form and select sql-method that utilizes such columnnames. BUT, when the select-method returns data, the columnnames are stripped of the tablename. This entails that you can't read data output from a self-join with a dtml document, because dtml cannot discern between the two calls of the same table from each other.
Have any of you out there any solution to this problem?
Of course you can come about the problem, by making a python script that returns the second calling of the table. Or you call the table with two dtml-in, but then you cannot mix the outcome. However, none of these methods are optimal since they are a bit awkvard and do not utilizes the opportunities of mysql. If fact they are not self joins, but pseudo self joins.
Flemming
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you make a self join, you have to give the table aliases so that mysql can distinguish between the two uses of the same table. Then the columns must be renamed as follows:
[tablename].[columnname]
You can easily make a form and select sql-method that utilizes such columnnames. BUT, when the select-method returns data, the columnnames are stripped of the tablename. This entails that you can't read data output from a self-join with a dtml document, because dtml cannot discern between the two calls of the same table from each other.
Have any of you out there any solution to this problem?
Of course you can come about the problem, by making a python script that returns the second calling of the table. Or you call the table with two dtml-in, but then you cannot mix the outcome. However, none of these methods are optimal since they are a bit awkvard and do not utilizes the opportunities of mysql. If fact they are not self joins, but pseudo self joins.
Flemming