Trace:
Differences ¶
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
en:tutorial:using-dao [2007/01/13 21:28] – created doubleface | en:tutorial:using-dao [2007/01/13 21:37] – doubleface | ||
---|---|---|---|
Line 12: | Line 12: | ||
In the DAO XML file, you can also define your own access methods to data, and jDao will generate the corresponding methods and requests in the DAO factory. | In the DAO XML file, you can also define your own access methods to data, and jDao will generate the corresponding methods and requests in the DAO factory. | ||
+ | |||
+ | ===== creating a first DAO ===== | ||
+ | |||
+ | |||
+ | You have command to be able to create a DAO file, based on an existing table. It has this following syntax: | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | A news table has been created before, and we will create a DAO named " | ||
+ | |||
+ | <code bash> | ||
+ | php jelix.php createdao news news news | ||
+ | </ | ||
+ | |||
+ | |||
+ | You obtain an actu.org/ | ||
+ | |||
+ | Its content is what follows : | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <dao xmlns=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | This is a very simple content, and of course there are other attributes and tags to enrich it and customize it. For the moment, we will leave it there. |