PEAR:DB specific functions file
This file implements the datastore functions necessary for PhpGedView to use an SQL database as its datastore. This file also implements array caches for the database tables. Whenever data is retrieved from the database it is stored in a cache. When a database access is requested the cache arrays are checked first before querying the database.
phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 PGV Development Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
PEAR:DB specific functions file
This file implements the datastore functions necessary for PhpGedView to use an SQL database as its datastore. This file also implements array caches for the database tables. Whenever data is retrieved from the database it is stored in a cache. When a database access is requested the cache arrays are checked first before querying the database.
phpGedView: Genealogy Viewer Copyright (C) 2002 to 2007 PGV Development Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
check if a gedcom has been imported into the database
this function checks the database to see if the given gedcom has been imported yet.
Helper function for sorting the $found_facts array
query the database
this function will perform the given SQL query on the database
Clean up an item retrieved from the database
clean the slashes and convert special html characters to their entities for display and entry into form elements
prepare an item to be updated in the database
add slashes and convert special chars so that it can be added to db
Delete a gedcom from the database and the system
Does not delete the file from the file system
find the gedcom record for a family
This function first checks the $famlist cache to see if the family has already been retrieved from the database. If it hasn't been retrieved, then query the database and add it to the cache. also lookup the husb and wife so that they are in the cache
find and return the id of the first person in the gedcom
find the gedcom record
This function first checks the caches to see if the record has already been retrieved from the database. If it hasn't been retrieved, then query the database and add it to the cache.
Find a media record by its ID
find the gedcom record for an individual
This function first checks the $indilist cache to see if the individual has already been retrieved from the database. If it hasn't been retrieved, then query the database and add it to the cache.
Find a repository record by its ID
find the gedcom record for a source
This function first checks the $sourcelist cache to see if the source has already been retrieved from the database. If it hasn't been retrieved, then query the database and add it to the cache.
Get Families Starting with a letter
This function finds all of the families who start with the given letter
Get Individuals Starting with a letter
This function finds all of the individuals who start with the given letter
Get the list of current and upcoming events, sorted by anniversary date
This function is used by the Todays and Upcoming blocks on the Index and Portal pages. It is also used by the RSS feed.
Special note on unknown day-of-month: When the anniversary date is imprecise, the sort will pretend that the day-of-month is either tomorrow or the first day of next month. These imprecise anniversaries will sort to the head of the chosen day.
Special note on Privacy: This routine does not check the Privacy of the events in the list. That check has to be done by the routine that makes use of the event list.
Retrieve the array of faqs from the DB table blocks
get all first letters of individual's last names
get next unique id for the given table
find all of the places in the hierarchy The $parent array holds the parent hierarchy of the places we want to get. The level holds the level in the hierarchy that we are at.
get place parent ID
get all of the place connections
get recent changes since the given date inclusive
get_remote_id Recieves a RFN key and returns a Stub ID if the RFN exists
get a list of all the repository titles
returns an array of all of the repositorytitles in the database.
get a list of remote servers
get a list of all the source titles
returns an array of all of the sourcetitles in the database.
get a list of all the sources
returns an array of all of the sources in the database.
Get Families with a given surname
This function finds all of the individuals who have the given surname
Get Individuals with a given surname
This function finds all of the individuals who have the given surname
get the top surnames
Load up a group of families into the cache by their ids from an array
This function is useful for optimizing pages that need to reference large sets of families without loading them up individually
Load up a group of people into the cache by their ids from an array
This function is useful for optimizing pages that need to reference large sets of people without loading them up individually
reset the i_isdead column
This function will reset the i_isdead column with the default -1 so that all is dead status items will be recalculated.
Search the dates table for families that had events on the given day
Search the families table for individuals are part of that family either as a husband, wife or child.
Search the database for individuals that match the query
uses a regular expression to search the gedcom records of all individuals and returns an array list of the matching individuals
Search the dates table for individuals that had events on the given day
Search for individuals who had dates within the given year ranges
Search the dates table for other records that had events on the given day
Search the dates table for sources that had events on the given day
update the is_dead status in the database
this function will update the is_dead field in the individuals table with the correct value calculated by the is_dead() function. To improve import performance, the is_dead status is first set to -1 during import. The first time the is_dead status is retrieved this function is called to update the database. This makes the first request for a person slower, but will speed up all future requests.
Documentation generated on Wed, 28 Mar 2007 09:54:17 -0600 by phpDocumentor 1.3.1