Op 23-11-11 17:39, Gergely Buday schreef:
Hi,

in demo/sql.ur there is a queryX:

  rows<- queryX (SELECT * FROM t)
             (fn row =>  <xml><tr>
               <td>{[row.T.A]}</td>  <td>{[row.T.B]}</td>
<td>{[row.T.C]}</td>  <td>{[row.T.D]}</td>
               <td><form><submit action={delete row.T.A}
value="Delete"/></form></td>
             </tr></xml>);

Where does this T in row.T.A come from? Does row have any other field?

- Gergely
It comes from the name of the table (in this case t), but then capitalized.

Adam said some time ago he would add something to the manual about this. I didn't check whether he actually did that.

There are other functions prefixed by query which allow you to get access to the fields directly (to instead or [row.T.A] you would have [row.A]). In the end all of them are variations on query.

I suggest you just understand how query works and use that until you see the repetition in your code (and then switch to the other versions).


--
Best regards,
  Ron de Bruijn

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to