On 15.May.2002 -- 09:05 PM, Hiloliddin Karimov wrote: > Hi, > > I try use DatabaseSelectAction for selection. I have searched in the > archive, but I haven't found solution, please help. > If I want select all, I try: > <table name="users"> > <values> > <value param="username" dbcol="username" type="string"/> > <value param="balance" dbcol="balance" type="double"/> > <value param="status" dbcol="status" type="string"/> > </values> > </table> > then SQL is: SELECT username, balance, status FROM users WHERE > and error: unexpected end of SQL command. > why DatabaseSelectAction still use WHERE?
The DatabaseSelectAction is not meant to be a general database access. You cannot specify arbitrary where clause for example. Just retrieve a single row from a table. Of course it could be changed to not use "WHERE" if no keys are present. But how often do you really want to retrieve _all_ rows from a database table? > 2. How can I get results? > I see in the "Request logicsheet elements" I can get some more results by > use: > <xsp-request:get-parameter-values name="username"/> isn't it? > is there, to read results by row such as: <esql:results> <esql:row-results> Results are stored in request attributes (_not_ parameters!). In addition, results have a prefix "org.apache.cocoon.acting.AbstractDatabaseAction:" Maybe it would be worthwhile to look into the esql logicsheet. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>