-
Notifications
You must be signed in to change notification settings - Fork 0
class dbconn
www/includes/mysql.inc.php
Database\MySQL
conn() | display_error() | nolog() | noquerys() | noquerytracks() | query_track() |
No constants found
__construct() | dbconn() | fetch() | insert() | lastid() | msg() | num() | numfields() | query() | saveerror() | seek() | tables() | update() |
public $conn
public $display_error
public $nolog
public $noquerys
public $noquerytracks
public $query_track
dbconn constructor.
- Inherited from \dbconn
public __construct( $database) : mixed
-
version:
1.0 -
since:
1.003.11.2019kassiopaiamethod added
MySQL DB Verbindungsaufbau
- Inherited from \dbconn
public dbconn(mixed $database) : mixed
-
version:
3.0 -
since:
3.010.11.2017IneXmethod code optimized - TODO: kassiopaia: mysql_select_charset() & $this->conn() müssen noch => php7.x ready gemacht werden?
Fetcht ein SQL-Resultat in ein Array
- Inherited from \dbconn
public fetch( $result) : array
- TODO: add 2nd param for MYSQLI_ASSOC feature? See e.g. /js/ajax/get-userpic.php
Fügt eine neue Row anhand eines assoziativen Arrays in eine DB-Table. Die Keys des Arrays entsprechen den Feldnamen
- Inherited from \dbconn
public insert(string $table, array $values, string $file = '', int $line, string $funktion = null) : \Primärschlüssel
- author: [z]biko
-
version:
2.5 -
since:
1.0method added -
since:
2.026.05.2019IneXimproved code, additional parameter and logging -
since:
2.527.09.2019IneXadded fix for "NOW()" instead of NOW()
gibt die letzte Autoincrement ID zurück.
- Inherited from \dbconn
public lastid() : int
Gibt die Errormeldungen formatiert zurück
- Inherited from \dbconn
public msg( $sql = '', $file = '', $line = '', mixed $funktion = '') : string
Gibt die Anzahl betroffener Datensätze zurück.
- Inherited from \dbconn
public num( $result, mixed $errorchk = TRUE) : int
Gibt die Anzahl betroffener Felder zurück.
- Inherited from \dbconn
public numfields( $result) : int
Führt ein SQL-Query aus
- Inherited from \dbconn
public query( $sql, $file = '', $line, mixed $funktion = '') : object|int
-
version:
2.1 -
since:
1.0method added -
since:
2.006.11.2018IneXadded mysql_affected_rows()-result for UPDATE-queries -
since:
2.107.08.2019IneXchanged return mysql_insert_id() & mysql_affected_rows() to return row-id or true
Speichert SQL-Errors in der DB
- Inherited from \dbconn
public saveerror( $msg, $sql, $file = '', $line, mixed $funktion = '') : void
Setzt den Zeiger auf einen Datensatz.
- Inherited from \dbconn
public seek( $result, $rownum) : object
Gibt sämtliche Tabellennamen einer DB als Array zurück.
- Inherited from \dbconn
public tables() : array
Ändert eine Row ein einer DB-Table, ähnlich insert
- Inherited from \dbconn
public update(string $table, array|int $id, array $values, string $file = '', int $line = '', string $funktion = '') : int|bool
- author: [z]biko
-
version:
3.0 -
since:
1.0method added -
since:
1.110.11.2017added 3rd optional parameter $funktion for better logging -
since:
2.020.08.2018added return as mysql_affected_rows() -
since:
3.005.11.2018fixed iteration for $id (WHERE x=y) building, depending if array or integer is provided - FIXME: nicht PHP7.x-kompatibel
- FIXME: array($id) soll nicht key,value-Pairs parsen, sondern direkt der Vergleich (z.B. "id>2"), aktuell kann nur auf 1 name & mehrere exakte values geprüft werden: "a=b OR a=c"
- TODO: change all usages of $db->update to pass associative array elements, like 'name'=>'Barbara Harris'.
\ » Classes » dbconn
Documentation generated on April 26th, 2020 at 15:54.
Powered by phpDocumentor with template GitHub-wiki.