Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_db_legacy_updater_Table
  • Overview
  • Package
  • Class

Class icms_db_legacy_updater_Table

icms_db_legacy_updater_Table class

Information about an individual table

Package: Database\Updater
Category: ICMS
Copyright: The ImpressCMS Project http://www.impresscms.org/
License: GNU General Public License (GPL)
Author: marcan marcan@smartfactory.ca
Link: The SmartFactory
Located at db/legacy/updater/Table.php
Methods summary
public
# __construct( string $name )

Constructor

Constructor

Parameters

$name
name of the table
public string
# name( )

Return the table name, prefixed with site table prefix

Return the table name, prefixed with site table prefix

Returns

string
table name
public boolean
# exists( )

Detemines if a table exists in the current db

Detemines if a table exists in the current db

Checks if the table already exists in the database

Returns

boolean
True if table exists, false if not

Author

xhelp development team
public
# getExistingFieldsArray( )
public
# fieldExists( $field )
public
# setStructure( string $structure )

Set the table structure

Set the table structure

Example : $table->setStructure("transactionid int(11) NOT NULL auto_increment, date int(11) NOT NULL default '0', status int(1) NOT NULL default '-1', itemid int(11) NOT NULL default '0', uid int(11) NOT NULL default '0', price float NOT NULL default '0', currency varchar(100) NOT NULL default '', PRIMARY KEY (transactionid)");

Parameters

$structure
table structure
public string
# getStructure( )

Returns the table structure

Returns the table structure

Returns

string
table structure
public
# setData( string $data )

Add values of a record to be added

Add values of a record to be added

Parameters

$data
values of a record
public array
# getData( )

Get the data array

Get the data array

Returns

array
containing the records values to be added
public boolean
# addData( )

Use to insert data in a table

Use to insert data in a table

Returns

boolean
true if success, false if an error occured
public
# addAlteredField( string $name, string $properties, $newname = false, $showerror = true )

Add a field to be added

Add a field to be added

Parameters

$name
name of the field
$properties
properties of the field
$newname
$showerror
public
# addNewField( string $name, string $properties )

Add new field of a record to be added

Add new field of a record to be added

Parameters

$name
name of the field
$properties
properties of the field
public array
# getAlteredFields( )

Get fields that need to be altered

Get fields that need to be altered

Returns

array
fields that need to be altered
public boolean
# addUpdateAll( string $fieldname, string $fieldvalue, object $criteria, boolean $fieldvalueIsOperation )

Add item to be updated on the the table via the UpdateAll method

Add item to be updated on the the table via the UpdateAll method

Parameters

$fieldname
Name of the field
$fieldvalue
Value to write
$criteria
icms_db_criteria_Element
$fieldvalueIsOperation
TRUE if fieldvalue is an operation, for example, conf_order+1

Returns

boolean
public boolean
# addDeleteAll( string $criteria, string $fieldvalue,…, object $criteria,… )

Add item to be updated on the the table via the UpdateAll method

Add item to be updated on the the table via the UpdateAll method

Parameters

$criteria
$fieldname Name of the field
$fieldvalue,…
Value to write
$criteria,…
icms_db_criteria_Element

Returns

boolean
public array
# getNewFields( )

Get new fields to be added

Get new fields to be added

Returns

array
fields to be added
public array
# getUpdateAll( )

Get items to be updated

Get items to be updated

Returns

array
items to be updated
public array
# getDeleteAll( )

Get items to be deleted

Get items to be deleted

Returns

array
items to be deleted
public
# addDropedField( string $name )

Add values of a record to be added

Add values of a record to be added

Parameters

$name
name of the field
public array
# getDropedFields( )

Get fields that need to be droped

Get fields that need to be droped

Returns

array
fields that need to be droped
public
# setFlagForDrop( )

Set the flag to drop the table

Set the flag to drop the table

public boolean
# createTable( )

Use to create a table

Use to create a table

Returns

boolean
true if success, false if an error occured
public boolean
# dropTable( )

Use to drop a table

Use to drop a table

Returns

boolean
true if success, false if an error occured
public boolean
# alterTable( )

Use to alter a table

Use to alter a table

Returns

boolean
true if success, false if an error occured
public boolean
# addNewFields( )

Use to add new fileds in the table

Use to add new fileds in the table

Returns

boolean
true if success, false if an error occured
public boolean
# updateAll( string $fieldname,…, string $fieldvalue,…, object $criteria,… )

Change a value for objects with a certain criteria

Change a value for objects with a certain criteria

Parameters

$fieldname,…
Name of the field
$fieldvalue,…
Value to write
$criteria,…
icms_db_criteria_Element

Returns

boolean
public boolean
# deleteAll( object $criteria,… )

delete all objects meeting the conditions

delete all objects meeting the conditions

Parameters

$criteria,…
icms_db_criteria_Element with conditions to meet

Returns

boolean
public boolean
# dropFields( )

Use to drop fields

Use to drop fields

Returns

boolean
true if success, false if an error occured
Properties summary
public string $_name

$_name name of the table

$_name name of the table

#
public string $_structure

$_structure structure of the table

$_structure structure of the table

#
public array $_data

$_data containing valued of each records to be added

$_data containing valued of each records to be added

#
public array $_alteredFields

$_alteredFields containing fields to be altered

$_alteredFields containing fields to be altered

#
public array $_newFields

$_newFields containing new fields to be added

$_newFields containing new fields to be added

#
public array $_dropedFields

$_dropedFields containing fields to be droped

$_dropedFields containing fields to be droped

#
public array $_flagForDrop

$_flagForDrop flag table to drop it

$_flagForDrop flag table to drop it

# false
public array $_updateAll

$_updateAll containing items to be updated

$_updateAll containing items to be updated

#
public array $_deleteAll

$_deleteAll containing items to be deleted

$_deleteAll containing items to be deleted

#
public boolean $_existingFieldsArray
# false
public boolean $force

$force force the query even in a GET process

$force force the query even in a GET process

# false
public $_db

For backward compat

For backward compat

#
public @link $db

xoopsDB database object

xoopsDB database object

#
public array $_messages

$_messages containing messages to be shown

$_messages containing messages to be shown

# array()
API documentation generated by ApiGen