Helper: dbquery

Aus CodeCoupler Wiki
Version vom 21. August 2012, 10:26 Uhr von Tm (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

This helper provides only one function:

function dbquery($sql)

The function executes the database query. If an error occurs the function will throw an exception. If the query success the return value depends on the type of query.

  • SELECT-Statements return the codeigniter result-object
  • INSERT-Statements return the last inserted id
  • UPDATE or DELETE (and all the other) Statements return the number of rows affected