Trace:
Differences ¶
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:tutorial:database-config [2006/09/29 08:51] – doubleface | en:tutorial:database-config [2007/09/17 22:42] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configuring the database access ====== | + | This page has been moved to [[en: |
- | + | ||
- | Before going further with code, you have to configure Jelix to be able to access a database, and feed this databasea little bit. We will indeed store our news in a table | + | |
- | + | ||
- | Jelix can handle mysql, postgresql, sqlite and pdo. Through its driver system, it is possible to add other types of databases (if you don't want to use pdo). | + | |
- | + | ||
- | + | ||
- | ===== Access configuration file ===== | + | |
- | + | ||
- | The access to a database | + | |
- | + | ||
- | Each profile has a name and is specified like this : | + | |
- | + | ||
- | <code ini> | + | |
- | [ProfileName] | + | |
- | driver=" | + | |
- | database=" | + | |
- | host= " | + | |
- | user= " | + | |
- | password=" | + | |
- | persistent= on ; indicating if the connexion is persistent | + | |
- | </ | + | |
- | + | ||
- | Except the dirver parameter, which is mandatory, the other parameters depend on the driver which is used. In general, you will have the database, host, user and password parameters. Change the content of this file according to your configuration. We will take as profile name " | + | |
- | + | ||
- | <code ini> | + | |
- | default = actu.org | + | |
- | + | ||
- | [actu.org] | + | |
- | driver=" | + | |
- | database=" | + | |
- | host= " | + | |
- | user= " | + | |
- | password=" | + | |
- | persistent= on | + | |
- | </ | + | |
- | + | ||
- | Check in the actu.org/ | + | |
- | + | ||
- | <code ini> | + | |
- | | + | |
- | </ | + | |
- | + | ||
- | It is indeed sometimes interesting to have several entrance points, then several | + |