cos is not a table in database. It is just a dummy name. (based on the example TagLib reference:dbform tag:tableList part)
Are whereClause and search (dynamically using rendered html inputs such as searchalgo_0_1 and searchmode_0_1) still work together under such situation?
thank you!
--bee
Shawn wrote:
On Wed, 08 Oct 2003 14:11:20 +0800, Chow Kwan Yu <[EMAIL PROTECTED]> wrote:
Hi,
Let me try query and tells the result later.
BTW, can whereClause be used together with searches (1.1.3) (not using attribute but by HTML inputs)? I've tried the following thing but seems clicking on "Applica!" gives no effect on the SQL prepared statement generated by dbforms:
<db:dbform autoUpdate="false" followUp="/customer2.jsp" maxRows="5"
tableName="cos" tableList="customer,orders,service"
whereClause="WHERE customer.id=orders.customer_id AND orders.service_id=service.id">
<INPUT type="text" name="<%= searchFieldNames_cos.get("orders.order_id") %>">
<input type="button" value="Applica!" onClick="javascript:document.dbform.submit()">
I think the problem here is that you say tableName="cos" but in your dbforms-config.xml the table cos doesn't contain customer.id etc. so you need to use a query instead I think.
As far as I know whereClause and searches should be ok. Again though, I think you need to be using a query since "orders.order_id" needs to really be in your table if you are using table (of course if cos is really a view in your database and contains it then that should be ok as far as I know. I don't use views so am not the expert on that) .
<table name="cos">
<field name="customer.id" fieldType="int" size="11"/>
<field name="customer.firstname" fieldType="char" size="50"/>
<field name="orders.order_id" fieldType="int" size="11" isKey="true" autoInc="true" sortable="true"/>
<field name="service.id" fieldType="int" size="11" sortable="true"/>
<field name="service.name" fieldType="char" size="30" sortable="true"/>
<field name="service.description" fieldType="char" size="255"/>
</table>
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
