| verzia 1.1, 2003/01/06 23:22:49 |
verzia 1.2, 2003/02/11 19:48:04 |
| Riadok 3 Database abstraction |
|
| Riadok 3 Database abstraction |
|
| |
|
| Based on the ideas by <knut.pape@planet-interkom.de> |
Based on the ideas by <knut.pape@planet-interkom.de> |
| and Ondrej Jombik <nepto@pobox.sk> |
and Ondrej Jombik <nepto@pobox.sk> |
| |
and Ronan Paul <paulro@club-internet.fr> |
| |
|
| 07/Jan/2002 |
07/Jan/2002 |
| |
|
| Riadok 26 operation should be such if(), whichwill |
|
| Riadok 27 operation should be such if(), whichwill |
|
| database abstraction mode, and if so, particular PEAR:DB statements will |
database abstraction mode, and if so, particular PEAR:DB statements will |
| be executed, fallback to current implementation otherwise. |
be executed, fallback to current implementation otherwise. |
| |
|
| |
RP: I do agree with the main idea but I would rather suggest to change |
| |
the code by creating a special class: replace all mysql_ calls buy calls |
| |
to your own class. Then adding PEAR:DB will only need to extend your |
| |
class (or just to replace it when you do not need specific mysql |
| |
function anymore). You should although keep in mind that PEAR does not |
| |
support certain mysql feature (like the autoincrement field which are |
| |
replaced by a more standard process: using specific tables which act |
| |
like a sequence). |
| |
|
| 4. We need add new $opts['dsn'] (data source name) to options and in |
4. We need add new $opts['dsn'] (data source name) to options and in |
| constructor add this option into $this->dsn. Later in code there should |
constructor add this option into $this->dsn. Later in code there should |
| be: |
be: |