CodeIgniter
[ class tree: CodeIgniter ] [ index: CodeIgniter ] [ all elements ]

Class: Entity_model

Source Location: /models/entity_model.php

Class Overview

Model
   |
   --Entity_model

Entity Model Class


Author(s):

Copyright:

  • Zdenek Kalina

Methods



Class Details

[line 14]
Entity Model Class

It can be used for operation with all tables in database Table is specified in method params




Tags:

author:  Zdenek Kalina <kalinz1@fel.cvut.cz>
copyright:  Zdenek Kalina


[ Top ]


Class Methods


constructor Entity_model [line 19]

Entity_model Entity_model( )

Constructor



[ Top ]

method count [line 112]

boolean count( string $table, [array $where = false])

Count items in table Where condition can be set



Parameters:

string   $table  
array   $where   where condition

[ Top ]

method delete [line 153]

void delete( string $table, array $where)

Delete items



Parameters:

string   $table  
array   $where   where condition

[ Top ]

method exist [line 91]

boolean exist( string $table, string $what, [array $where = array()])

Test if item exist in table



Parameters:

string   $table  
string   $what  
array   $where   where condition

[ Top ]

method insert [line 141]

mixed insert( string $table, string $what, [boolean $return = true])

Insert item



Parameters:

string   $table  
string   $what  
boolean   $return   returns insert id if true

[ Top ]

method select [line 36]

array select( string $table, string $what, [array $where = array()], [boolean $single_col = false], [string $order = false], [$limit $limit = false], [$offset $offset = 0])

Select more items from table



Parameters:

string   $table  
string   $what  
array   $where   where condition
boolean   $single_col   if only one column is in select then return not associated array
string   $order  
$limit   $limit  
$offset   $offset  

[ Top ]

method selectOne [line 66]

mixed selectOne( string $table, string $what, [array $where = array()], [boolean $single_col = false], [string $order = false])

Select only one item from table If more items equals conditions only first is returned



Parameters:

string   $table  
string   $what  
array   $where   where condition
boolean   $single_col   if only one column is in select then return single variable
string   $order  

[ Top ]

method update [line 127]

boolean update( string $table, string $what, [array $where = array()])

Update items



Parameters:

string   $table  
string   $what  
array   $where   where condition

[ Top ]


Documentation generated on Sun, 11 Jan 2009 04:21:05 +0100 by phpDocumentor 1.4.1