Inherited Variables
Inherited Methods
Class: Core
- Core::coreFieldNames()
- Returns the core field names of the core table in an array.
- Core::deleteDBCache()
- Deletes data from the database cache based on the id key.
- Core::FilesListArray()
- Returns a list of filename within a path in array.
- Core::getAllDataArray()
- Returns all records with the all items from the table.
- Core::getAllDataObject()
- Returns all records with all items from the table.
- Core::getAllItemsArray()
- Similar to getAllItemsObject() method but returns the records in an associative array.
- Core::getAllItemsObject()
- Returns all records with the needed items from the table.
- Core::getDBCache()
- Gets temporary data from the database cache.
- Core::getErrorMsg()
- Feturns the value of error_msg, the internal error message.
- Core::getLastQuery()
- Returns the the last sql query string
- Core::getResult()
- Feturns the value of result
- Core::insertDataFromArray()
- Inserts data from an array (passed by reference) into a table.
- Core::insertDataFromInternalArray()
- Inserts data from the internal array previously filled with data by the setDataArray() method.
- Core::isPreLoaded()
- Returns the value of is_preloaded that is set by methods that preload large number of data.
- Core::LastRecordCount()
- Returns the value of rec_count
- Core::saveDBCache()
- Saves temporary data to a cache in database.
- Core::setDataArray()
- Points the core data array to the external array that holds the data to be stored.
- Core::setRefArray()
- Points the reference variable $ref_array to the field names' array.
- Core::setSQL()
- Sets the internal sql query variable to the sql query.
- Core::setTable()
- Sets the coretable variable to the name of the database table.
- Core::setWhereCondition()
- Sets the "where" condition in an update query used with the updateDataFromInternalArray() method.
- Core::Transact()
- Transaction routine, ADODB transaction. It internally uses the ADODB transaction routine.
- Core::updateDataFromArray()
- Updates a record with the data from an array (passed by reference) based on the primary key.
- Core::updateDataFromInternalArray()
- Updates a table using data from an internal array previously filled with data by the setDataArray() method.
- Core::_prepSaveArray()
- Filters the data array intended for saving, removing the key-value pairs that do not correspond to the table's field names.
- Core::_RecordExists()
- Checks if a certain database record exists based onthe supplied query condition.
Class Details
Address methods.
Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance.
Tags:
- copyright - 2002,2003 Elpidio Latorilla
- version - beta 1.0.08
- author - Elpidio Latorilla
[ Top ]
Class Variables
$fld_citytown = array(
'nr',
'unece_modifier',
'unece_locode',
'name',
'iso_country_id',
'unece_locode_type',
'unece_coordinates',
'info_url',
'use_frequency',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 28]
Fieldnames of care_address_citytown table. Primary key is "nr".
Type: array
Overrides:
[ Top ]
$tb_citytown = 'care_address_citytown'
[line 23]
Database table for the citytown address data.
Type: string
Overrides:
[ Top ]
Class Methods
Address
Address Address(
int
$nr)
[line 49]
Constructor
Parameters:
- int $nr - Primary key of address record.
[ Top ]
CityTownExists
boolean CityTownExists(
[string
$name = ''], [string
$country = ''])
[line 121]
Checks if city or town exists based on name and ISO country code keys.
Parameters:
- string $name - Name of the city or town
- string $country - Country ISO code
[ Top ]
countAllActiveCityTown
int countAllActiveCityTown(
)
[line 105]
Counts all active city town addresses. Rreturns the count, else return zero.
Parameters:
[ Top ]
getAllActiveCityTown
mixed getAllActiveCityTown(
)
[line 68]
Gets all active city town addresses. Returns ADODB record object or boolean.
The returned adodb object contains rows of array with index keys corresponding to $fld_citytown.
Tags:
- access - public
Parameters:
[ Top ]
getCityTownInfo
object getCityTownInfo(
[int
$nr = ''])
[line 140]
Gets all record information of a city or town based on the record "nr" key.
Returns an ADODB record object or boolean.
Parameters:
- int $nr - Record nr (citytown nr) key
[ Top ]
getLimitActiveCityTown
mixed getLimitActiveCityTown(
[int
$len = 30], [int
$so = 0], [string
$oitem = 'name'], [string
$odir = 'ASC'])
[line 89]
Same as getAllActiveCityTown but uses the limit feature of adodb to limit the number or rows actually returned.
Returns ADODB record object or boolean.
Parameters:
- int $len - Length of data, or number of rows to be returned, default 30 rows
- int $so - Start index offset, default 0 = start index
- string $oitem - Sort item, default = 'name'
- string $odir - Sort direction, default = 'ASC'
[ Top ]
saveCityTownInfoFromArray
boolean saveCityTownInfoFromArray(
array
&$data)
[line 159]
Insert new city/town info in the database table. The data is contained in associative array and passed by reference.
The array keys must correspond to the field names contained in $fld_citytown.
Parameters:
- array &$data - Data to save. By reference.
[ Top ]
searchActiveCityTown
mixed searchActiveCityTown(
string
$key)
[line 196]
Searches for the active city or town based on a string keyword.
Returns an ADODB record object of search results or boolean.
Parameters:
- string $key - Search keyword
[ Top ]
searchCountActiveCityTown
int searchCountActiveCityTown(
string
$key)
[line 267]
Searches for the active city or town but returns only the total count of the resulting rows.
Returns the count value, else returns zero.
Parameters:
- string $key - Search keyword
[ Top ]
searchLimitActiveCityTown
mixed searchLimitActiveCityTown(
string
$key, [int
$len = 30], [int
$so = 0], [string
$oitem = 'name'], [string
$odir = 'ASC'])
[line 232]
Limited return search for the active city or town.
Returns an ADODB record object of search results or boolean.
Parameters:
- string $key - Search keyword
- int $len - Maximum number of rows returned, default=30
- int $so - Start index offset, defaut = 0 (start)
- string $oitem - Sort order item, default= name
- string $odir - Sort direction, default = ASC
[ Top ]
updateCityTownInfoFromArray
boolean updateCityTownInfoFromArray(
int
$nr, array
&$data)
[line 177]
Updates the city/town's data. The data is contained in associative array and passed by reference.
The array keys must correspond to the field names contained in $fld_citytown. Only the keys of data to be updated must be present in the passed array.
Parameters:
- int $nr - City/town's record nr (primary key)
- array &$data - Data passed as reference
[ Top ]
_useCityTown
void _useCityTown(
)
[line 57]
Sets the core table to the table name and field names of care_address_citytown
Tags:
- access - private
Parameters:
[ Top ]