TIP_Mysql
Introduction
The MySql data engine
- Source file
- /Type/data_engine/mysql.php
- Extends
- TIP_Data_Engine
Interface to the MySql database.
Some methods could be static, but I prefer to define them all as non-static to avoid confusion (for instance, preparedName() could be static but preparedValue not, because the connection property is needed).
Properties
server : string
The server address: it defaults to 'localhost'
- access
- protected
database : string
The database name
- access
- protected
user : string
The user name
- access
- protected
password : string
The password of $user
- access
- protected
dump_format : string
The import/export format of dump()
- access
- protected
Methods
checkOptions (&$options) : bool
Check the options
- &$options
- array
Properties values
- lines
- 78 - 81
- static
- yes
- access
- protected
Overridable static method that checks $options for missing or invalid values and eventually corrects its content.
__construct ($options)
Constructor
- $options
- array
Properties values
- lines
- 96 - 106
- access
- protected
Initializes a TIP_Mysql instance.
$options inherits the TIP_Type properties, and add the following: * $options['server']: server address
- $options['database']: database name (required)
- $options['user']: user name (required)
- $options['password']: user password (required)
preparedName ($name, [$domain])
- $name
- $domain
- [ = null ]
- lines
- 111 - 141
- access
- public
preparedValue ($value)
- $value
- lines
- 143 - 161
- access
- public
query ()
- lines
- 163 - 172
- access
- public
fillFields (&$data)
- &$data
- lines
- 174 - 216
- access
- public
select (&$data, $filter, $fields)
- &$data
- $filter
- $fields
- lines
- 218 - 258
- access
- public
insert (&$data, &$rows)
- &$data
- &$rows
- lines
- 260 - 276
- access
- public
update (&$data, $filter, &$row)
- &$data
- $filter
- &$row
- lines
- 278 - 283
- access
- public
delete (&$data, $filter)
- &$data
- $filter
- lines
- 285 - 289
- access
- public
dump ($root)
- $root
- lines
- 291 - 318
- access
- public
transaction ($action)
- $action
- lines
- 320 - 328
- access
- protected
TIP_Mysql
was last modified by
TiP
on
Mon 25 May 2009 06:22:25 PM CEST