\LibDatabase

Summary

Methods
Properties
Constants
get()
rows()
fetch()
insert()
update()
delete()
lastID()
error()
result()
truncate()
No public properties found
No constants found
No protected methods found
$instances
N/A
No private methods found
No private properties found
N/A

Properties

$instances

$instances : array

Type

array — Array of saved databases for reusing

Methods

get()

get(array  $group = false) : \lib\database

Static method get

Parameters

array $group

Returns

\lib\database

rows()

rows(string  $sql, array  $array = array(), object  $fetchMode = 'array') : array

method for multiple rows selecting records from a database birden fazla kolon bilgisini gonderir

Parameters

string $sql

sql query

array $array

named params

object $fetchMode

Returns

array —

returns an array of records

Examples

iyi ornekl sayfalar model içinde vardır getKategoriSayfalar
** File not found : en **

fetch()

fetch(string  $sql, object  $fetchMode = 'array') : array

method for single row selecting records from a database tek bir datayı/kolon bilgisini gönderir

Parameters

string $sql

sql query

object $fetchMode

Returns

array —

returns an array of records

insert()

insert(string  $table, array  $data) 

insert method

Parameters

string $table

table name

array $data

array of columns and values

update()

update(string  $table, array  $data, array  $where) 

update method //güncelleme işlemleri yapan kısım

Parameters

string $table

table name

array $data

array of columns and values

array $where

array of columns and values

delete()

delete(string  $table, array  $where, integer  $limit = 1) 

Delete method TR : silme işlemleri yapan kısım

Parameters

string $table

table name

array $where

array of columns and values

integer $limit

limit number of records

lastID()

lastID() 

son eklenenin id numarası

error()

error() 

son hatayı verir

result()

result(string  $sql) 

tek sonuc verir

Parameters

string $sql

table name

truncate()

truncate(string  $table) 

truncate table

Parameters

string $table

table name