| @@ 29-35 (lines=7) @@ | ||
| 26 | $this->db->setOption('portability', MDB2_PORTABILITY_NONE); |
|
| 27 | } |
|
| 28 | ||
| 29 | function query($SQL) |
|
| 30 | { |
|
| 31 | $this->result = $this->db->query($SQL); |
|
| 32 | if (PEAR::isError($this->result)) { |
|
| 33 | die($this->result->getMessage() . ' ' . $this->result->getUserInfo()); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| 37 | function exec($SQL) |
|
| 38 | { |
|
| @@ 37-45 (lines=9) @@ | ||
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| 37 | function exec($SQL) |
|
| 38 | { |
|
| 39 | $this->result = $this->db->exec($SQL); |
|
| 40 | if (PEAR::isError($this->result)) { |
|
| 41 | die($this->result->getMessage() . ' ' . $this->result->getUserInfo()); |
|
| 42 | } |
|
| 43 | ||
| 44 | $this->result->free(); |
|
| 45 | } |
|
| 46 | ||
| 47 | function nextRecord() |
|
| 48 | { |
|
| @@ 47-59 (lines=13) @@ | ||
| 44 | $this->result->free(); |
|
| 45 | } |
|
| 46 | ||
| 47 | function nextRecord() |
|
| 48 | { |
|
| 49 | // Gennemsøger recordset. |
|
| 50 | // Går videre til næste post hver gang den kaldes. |
|
| 51 | // Returnere true så længe der er en post |
|
| 52 | // while($db->next_record()) { |
|
| 53 | $this->row = $this->result->fetchRow(MDB2_FETCHMODE_ASSOC); |
|
| 54 | if (PEAR::isError($this->row)) { |
|
| 55 | die($this->row->getMessage() . '' . $this->row->getUserInfo()); |
|
| 56 | } |
|
| 57 | ||
| 58 | return($this->row); |
|
| 59 | } |
|
| 60 | ||
| 61 | function affectedRows() |
|
| 62 | { |
|