本文整理汇总了PHP中MySQLiConnectionFactory::getCon方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQLiConnectionFactory::getCon方法的具体用法?PHP MySQLiConnectionFactory::getCon怎么用?PHP MySQLiConnectionFactory::getCon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySQLiConnectionFactory
的用法示例。
在下文中一共展示了MySQLiConnectionFactory::getCon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($id = null, $conType = 'readonly')
{
$this->conn = MySQLiConnectionFactory::getCon($conType);
if ($id != null || is_numeric($id)) {
$this->id = $id;
}
}
示例2: __construct
function __construct()
{
$this->conn = MySQLiConnectionFactory::getCon('write');
if ($this->conn === false) {
exit("ABORT: Image upload aborted: Unable to establish connection to database");
}
}
示例3: __construct
function __construct($id)
{
$this->conn = MySQLiConnectionFactory::getCon("write");
if (is_numeric($id)) {
$this->clid = $id;
}
}
示例4: __construct
public function __construct()
{
$this->con = MySQLiConnectionFactory::getCon("readonly");
//Default settings
$this->taxAuthId = 1;
//0 = do not resolve taxonomy (no thesaurus); 1 = default taxonomy; > 1 = other taxonomies
}
示例5: __construct
function __construct()
{
set_time_limit(2000);
$this->conn = MySQLiConnectionFactory::getCon("write");
$this->setUploadTargetPath();
$this->targetArr = array('url', 'originalUrl', 'scientificName', 'tid', 'photographer', 'photographerUid', 'caption', 'locality', 'sourceUrl', 'anatomy', 'notes', 'owner', 'copyright', 'sortSequence', 'institutionCode', 'collectionCode', 'catalogNumber', 'occid');
}
示例6: __construct
function __construct()
{
$this->conn = MySQLiConnectionFactory::getCon("write");
$this->setUploadTargetPath();
set_time_limit(3000);
ini_set("max_input_time", 120);
ini_set('auto_detect_line_endings', true);
}
示例7: __construct
public function __construct($con = null)
{
if ($con) {
//Inherits connection from another class
$this->conn = $con;
} else {
$this->conn = MySQLiConnectionFactory::getCon("write");
}
}
示例8: editMetaData
public function editMetaData()
{
$setSql = "";
$con = MySQLiConnectionFactory::getCon("write");
$sql = 'UPDATE omsurveys SET ' . 'projectname = ' . ($_POST['projectname'] ? '"' . $this->cleanInStr(trim($_POST['projectname'])) . '"' : 'NULL') . ', ' . 'managers = ' . ($_POST['managers'] ? '"' . $this->cleanInStr(trim($_POST['managers'])) . '"' : 'NULL') . ', ' . 'locality = ' . ($_POST['locality'] ? '"' . $this->cleanInStr(trim($_POST['locality'])) . '"' : 'NULL') . ', ' . 'notes = ' . ($_POST['notes'] ? '"' . $this->cleanInStr(trim($_POST['notes'])) . '"' : 'NULL') . ', ' . 'latcentroid = ' . ($_POST['latcentroid'] ? $this->cleanInStr($_POST['latcentroid']) : 'NULL') . ', ' . 'longcentroid = ' . ($_POST['longcentroid'] ? $this->cleanInStr($_POST['longcentroid']) : 'NULL') . ', ' . 'ispublic = ' . ($_POST['ispublic'] ? 1 : 0) . ' ' . 'WHERE (surveyid = ' . $this->surveyId . ')';
//echo $sql;
$con->query($sql);
$con->close();
}
示例9: __construct
public function __construct()
{
global $defaultLang;
$this->con = MySQLiConnectionFactory::getCon("readonly");
//Default settings
$this->taxAuthId = 1;
//0 = do not resolve taxonomy (no thesaurus); 1 = default taxonomy; > 1 = other taxonomies
//$this->projName = "Arizona";
$this->language = $defaultLang;
}
示例10: __construct
public function __construct($conn = null)
{
if ($conn) {
$this->conn = $conn;
$this->isShareConn = true;
} else {
$this->conn = MySQLiConnectionFactory::getCon("write");
}
$this->occFieldArr = array('catalognumber', 'othercatalognumbers', 'occurrenceid', 'family', 'scientificname', 'sciname', 'tidinterpreted', 'scientificnameauthorship', 'identifiedby', 'dateidentified', 'identificationreferences', 'identificationremarks', 'taxonremarks', 'identificationqualifier', 'typestatus', 'recordedby', 'recordnumber', 'associatedcollectors', 'eventdate', 'year', 'month', 'day', 'startdayofyear', 'enddayofyear', 'verbatimeventdate', 'habitat', 'substrate', 'fieldnumber', 'occurrenceremarks', 'associatedtaxa', 'verbatimattributes', 'dynamicproperties', 'reproductivecondition', 'cultivationstatus', 'establishmentmeans', 'lifestage', 'sex', 'individualcount', 'samplingprotocol', 'preparations', 'country', 'stateprovince', 'county', 'municipality', 'locality', 'localitysecurity', 'localitysecurityreason', 'decimallatitude', 'decimallongitude', 'geodeticdatum', 'coordinateuncertaintyinmeters', 'footprintwkt', 'locationremarks', 'verbatimcoordinates', 'georeferencedby', 'georeferenceprotocol', 'georeferencesources', 'georeferenceverificationstatus', 'georeferenceremarks', 'minimumelevationinmeters', 'maximumelevationinmeters', 'verbatimelevation', 'disposition', 'language', 'duplicatequantity', 'genericcolumn1', 'genericcolumn2', 'labelproject', 'observeruid', 'basisofrecord', 'ownerinstitutioncode', 'datelastmodified', 'processingstatus', 'recordenteredby', 'dateentered');
}
示例11: __construct
public function __construct()
{
global $serverRoot, $userRights, $isAdmin;
//ini_set('memory_limit','512M');
set_time_limit(500);
//Ensure that PHP DOMDocument class is installed
if (!class_exists('DOMDocument')) {
exit('FATAL ERROR: PHP DOMDocument class is not installed, please contact your server admin');
}
$this->conn = MySQLiConnectionFactory::getCon('readonly');
$this->ts = time();
$this->condAllowArr = array('country', 'stateprovince', 'county', 'recordedby', 'family', 'sciname', 'processingstatus', 'ocr');
$this->coreFieldArr = array('id' => '', 'accessURI' => 'http://rs.tdwg.org/ac/terms/accessURI', 'providerManagedID' => 'http://rs.tdwg.org/ac/terms/providerManagedID', 'title' => 'http://purl.org/dc/terms/title', 'comments' => 'http://rs.tdwg.org/ac/terms/comments', 'Owner' => 'http://ns.adobe.com/xap/1.0/rights/Owner', 'rights' => 'http://purl.org/dc/terms/rights', 'UsageTerms' => 'http://ns.adobe.com/xap/1.0/rights/UsageTerms', 'WebStatement' => 'http://ns.adobe.com/xap/1.0/rights/WebStatement', 'MetadataDate' => 'http://ns.adobe.com/xap/1.0/MetadataDate', 'associatedSpecimenReference' => 'http://rs.tdwg.org/ac/terms/associatedSpecimenReference', 'type' => 'http://purl.org/dc/terms/type', 'subtype' => 'http://rs.tdwg.org/ac/terms/subtype', 'format' => 'http://purl.org/dc/terms/format', 'metadataLanguage' => 'http://rs.tdwg.org/ac/terms/metadataLanguage');
$this->stubFieldArr = array('coreid' => '', 'institutionCode' => 'http://rs.tdwg.org/dwc/terms/institutionCode', 'collectionCode' => 'http://rs.tdwg.org/dwc/terms/collectionCode', 'occurrenceID' => 'http://rs.tdwg.org/dwc/terms/occurrenceID', 'catalogNumber' => 'http://rs.tdwg.org/dwc/terms/catalogNumber', 'otherCatalogNumbers' => 'http://rs.tdwg.org/dwc/terms/otherCatalogNumbers', 'family' => 'http://rs.tdwg.org/dwc/terms/family', 'scientificName' => 'http://rs.tdwg.org/dwc/terms/scientificName', 'scientificNameAuthorship' => 'http://rs.tdwg.org/dwc/terms/scientificNameAuthorship', 'genus' => 'http://rs.tdwg.org/dwc/terms/genus', 'specificEpithet' => 'http://rs.tdwg.org/dwc/terms/specificEpithet', 'taxonRank' => 'http://rs.tdwg.org/dwc/terms/taxonRank', 'infraspecificEpithet' => 'http://rs.tdwg.org/dwc/terms/infraspecificEpithet', 'identifiedBy' => 'http://rs.tdwg.org/dwc/terms/identifiedBy', 'dateIdentified' => 'http://rs.tdwg.org/dwc/terms/dateIdentified', 'identificationReferences' => 'http://rs.tdwg.org/dwc/terms/identificationReferences', 'identificationRemarks' => 'http://rs.tdwg.org/dwc/terms/identificationRemarks', 'taxonRemarks' => 'http://rs.tdwg.org/dwc/terms/taxonRemarks', 'identificationQualifier' => 'http://rs.tdwg.org/dwc/terms/identificationQualifier', 'typeStatus' => 'http://rs.tdwg.org/dwc/terms/typeStatus', 'recordedBy' => 'http://rs.tdwg.org/dwc/terms/recordedBy', 'recordNumber' => 'http://rs.tdwg.org/dwc/terms/recordNumber', 'eventDate' => 'http://rs.tdwg.org/dwc/terms/eventDate', 'year' => 'http://rs.tdwg.org/dwc/terms/year', 'month' => 'http://rs.tdwg.org/dwc/terms/month', 'day' => 'http://rs.tdwg.org/dwc/terms/day', 'startDayOfYear' => 'http://rs.tdwg.org/dwc/terms/startDayOfYear', 'endDayOfYear' => 'http://rs.tdwg.org/dwc/terms/endDayOfYear', 'verbatimEventDate' => 'http://rs.tdwg.org/dwc/terms/verbatimEventDate', 'habitat' => 'http://rs.tdwg.org/dwc/terms/habitat', 'substrate' => '', 'fieldNumber' => 'http://rs.tdwg.org/dwc/terms/fieldNumber', 'occurrenceRemarks' => 'http://rs.tdwg.org/dwc/terms/occurrenceRemarks', 'informationWithheld' => 'http://rs.tdwg.org/dwc/terms/informationWithheld', 'dynamicProperties' => 'http://rs.tdwg.org/dwc/terms/dynamicProperties', 'associatedTaxa' => 'http://rs.tdwg.org/dwc/terms/associatedTaxa', 'reproductiveCondition' => 'http://rs.tdwg.org/dwc/terms/reproductiveCondition', 'establishmentMeans' => 'http://rs.tdwg.org/dwc/terms/establishmentMeans', 'lifeStage' => 'http://rs.tdwg.org/dwc/terms/lifeStage', 'sex' => 'http://rs.tdwg.org/dwc/terms/sex', 'individualCount' => 'http://rs.tdwg.org/dwc/terms/individualCount', 'samplingProtocol' => 'http://rs.tdwg.org/dwc/terms/samplingProtocol', 'preparations' => 'http://rs.tdwg.org/dwc/terms/preparations', 'country' => 'http://rs.tdwg.org/dwc/terms/country', 'stateProvince' => 'http://rs.tdwg.org/dwc/terms/stateProvince', 'county' => 'http://rs.tdwg.org/dwc/terms/county', 'municipality' => 'http://rs.tdwg.org/dwc/terms/municipality', 'locality' => 'http://rs.tdwg.org/dwc/terms/locality', 'decimalLatitude' => 'http://rs.tdwg.org/dwc/terms/decimalLatitude', 'decimalLongitude' => 'http://rs.tdwg.org/dwc/terms/decimalLongitude', 'geodeticDatum' => 'http://rs.tdwg.org/dwc/terms/geodeticDatum', 'coordinateUncertaintyInMeters' => 'http://rs.tdwg.org/dwc/terms/coordinateUncertaintyInMeters', 'footprintWKT' => 'http://rs.tdwg.org/dwc/terms/footprintWKT', 'verbatimCoordinates' => 'http://rs.tdwg.org/dwc/terms/verbatimCoordinates', 'georeferencedBy' => 'http://rs.tdwg.org/dwc/terms/georeferencedBy', 'georeferenceProtocol' => 'http://rs.tdwg.org/dwc/terms/georeferenceProtocol', 'georeferenceSources' => 'http://rs.tdwg.org/dwc/terms/georeferenceSources', 'georeferenceVerificationStatus' => 'http://rs.tdwg.org/dwc/terms/georeferenceVerificationStatus', 'georeferenceRemarks' => 'http://rs.tdwg.org/dwc/terms/georeferenceRemarks', 'minimumElevationInMeters' => 'http://rs.tdwg.org/dwc/terms/minimumElevationInMeters', 'maximumElevationInMeters' => 'http://rs.tdwg.org/dwc/terms/maximumElevationInMeters', 'verbatimElevation' => 'http://rs.tdwg.org/dwc/terms/verbatimElevation', 'ocrOutput' => '', 'language' => 'http://purl.org/dc/terms/language', 'recordId' => 'http://portal.idigbio.org/terms/recordId');
$this->securityArr = array('locality', 'minimumElevationInMeters', 'maximumElevationInMeters', 'verbatimElevation', 'decimalLatitude', 'decimalLongitude', 'geodeticDatum', 'coordinateUncertaintyInMeters', 'footprintWKT', 'verbatimCoordinates', 'georeferenceRemarks', 'georeferencedBy', 'georeferenceProtocol', 'georeferenceSources', 'georeferenceVerificationStatus', 'habitat', 'informationWithheld');
}
示例12: __construct
public function __construct()
{
global $userRights, $isAdmin, $charset;
$this->conn = MySQLiConnectionFactory::getCon('readonly');
//Set rare species variables
$this->securityArr = array('locality', 'locationRemarks', 'minimumElevationInMeters', 'maximumElevationInMeters', 'verbatimElevation', 'decimalLatitude', 'decimalLongitude', 'geodeticDatum', 'coordinateUncertaintyInMeters', 'footprintWKT', 'verbatimCoordinates', 'georeferenceRemarks', 'georeferencedBy', 'georeferenceProtocol', 'georeferenceSources', 'georeferenceVerificationStatus', 'habitat');
if ($isAdmin || array_key_exists("CollAdmin", $userRights) || array_key_exists("RareSppAdmin", $userRights) || array_key_exists("RareSppReadAll", $userRights)) {
$this->redactLocalities = false;
}
if (array_key_exists('CollEditor', $userRights)) {
$this->rareReaderArr = $userRights['CollEditor'];
}
if (array_key_exists('RareSppReader', $userRights)) {
$this->rareReaderArr = array_unique(array_merge($this->rareReaderArr, $userRights['RareSppReader']));
}
//Character set
$this->charSetSource = strtoupper($charset);
$this->charSetOut = $this->charSetSource;
}
示例13: __construct
public function __construct()
{
//Ensure that PHP DOMDocument class is installed
if (!class_exists('DOMDocument')) {
exit('FATAL ERROR: PHP DOMDocument class is not installed, please contact your server admin');
}
$this->conn = MySQLiConnectionFactory::getCon('readonly');
$this->ts = time();
if (!$this->logFH && $this->verbose) {
$logFile = $GLOBALS['SERVER_ROOT'] . (substr($GLOBALS['SERVER_ROOT'], -1) == '/' ? '' : '/') . "temp/logs/DWCA_" . date('Y-m-d') . ".log";
$this->logFH = fopen($logFile, 'a');
}
//Character set
$this->charSetSource = strtoupper($GLOBALS['CHARSET']);
$this->charSetOut = $this->charSetSource;
$this->condAllowArr = array('catalognumber', 'othercatalognumbers', 'occurrenceid', 'family', 'sciname', 'country', 'stateprovince', 'county', 'municipality', 'recordedby', 'recordnumber', 'eventdate', 'decimallatitude', 'decimallongitude', 'minimumelevationinmeters', 'maximumelevationinmeters', 'datelastmodified', 'dateentered');
$this->securityArr = array('eventDate', 'month', 'day', 'startDayOfYear', 'endDayOfYear', 'verbatimEventDate', 'recordNumber', 'locality', 'locationRemarks', 'minimumElevationInMeters', 'maximumElevationInMeters', 'verbatimElevation', 'decimalLatitude', 'decimalLongitude', 'geodeticDatum', 'coordinateUncertaintyInMeters', 'footprintWKT', 'verbatimCoordinates', 'georeferenceRemarks', 'georeferencedBy', 'georeferenceProtocol', 'georeferenceSources', 'georeferenceVerificationStatus', 'habitat', 'informationWithheld');
//ini_set('memory_limit','512M');
set_time_limit(500);
}
示例14: __construct
public function __construct()
{
$this->conn = MySQLiConnectionFactory::getCon("write");
$this->imageRootPath = $GLOBALS["imageRootPath"];
if (substr($this->imageRootPath, -1) != "/") {
$this->imageRootPath .= "/";
}
$this->imageRootUrl = $GLOBALS["imageRootUrl"];
if (substr($this->imageRootUrl, -1) != "/") {
$this->imageRootUrl .= "/";
}
if (array_key_exists('imgTnWidth', $GLOBALS)) {
$this->tnPixWidth = $GLOBALS['imgTnWidth'];
}
if (array_key_exists('imgWebWidth', $GLOBALS)) {
$this->webPixWidth = $GLOBALS['imgWebWidth'];
}
if (array_key_exists('imgFileSizeLimit', $GLOBALS)) {
$this->webFileSizeLimit = $GLOBALS['imgFileSizeLimit'];
}
}
示例15: __construct
public function __construct($collId = 0)
{
$this->collId = $collId;
$this->conn = MySQLiConnectionFactory::getCon("write");
$sql = 'SELECT collid, institutioncode, collectioncode, collectionname, colltype FROM omcollections ';
if ($collId && is_numeric($collId)) {
$sql .= 'WHERE (collid = ' . $collId . ')';
} else {
$sql .= 'WHERE (colltype = "General Observations")';
}
$rs = $this->conn->query($sql);
if ($r = $rs->fetch_object()) {
$this->collMap['collid'] = $r->collid;
$this->collMap['institutioncode'] = $r->institutioncode;
$this->collMap['collectioncode'] = $r->collectioncode;
$this->collMap['collectionname'] = $this->cleanOutStr($r->collectionname);
$this->collMap['colltype'] = $r->colltype;
if (!$this->collId) {
$this->collId = $r->collid;
}
}
$rs->close();
}