当前位置: 首页>>代码示例>>PHP>>正文


PHP MySQL::EndOfSeek方法代码示例

本文整理汇总了PHP中MySQL::EndOfSeek方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::EndOfSeek方法的具体用法?PHP MySQL::EndOfSeek怎么用?PHP MySQL::EndOfSeek使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MySQL的用法示例。


在下文中一共展示了MySQL::EndOfSeek方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_users

 /**
  * returns array of all users
  * [userID] => 23103741
  * [name] => admin
  * [mail] => 0
  * [active] => 0
  *
  * @param int $trash
  * @param array $groups list of group ids the users must be a member of
  * @return array
  * @author th
  */
 public function get_users($trash = 0, array $groups = null)
 {
     $p = $this->kga['server_prefix'];
     $trash = MySQL::SQLValue($trash, MySQL::SQLVALUE_NUMBER);
     if (empty($groups)) {
         $query = "SELECT * FROM {$p}users\n                WHERE trash = {$trash}\n                ORDER BY name ;";
     } else {
         $query = "SELECT DISTINCT u.* FROM {$p}users AS u\n                JOIN {$p}groups_users AS g_u USING(userID)\n                WHERE g_u.groupID IN (" . implode($groups, ',') . ") AND\n                trash = {$trash}\n                ORDER BY name ;";
     }
     $this->conn->Query($query);
     $rows = $this->conn->RowArray(0, MYSQLI_ASSOC);
     $i = 0;
     $arr = array();
     $this->conn->MoveFirst();
     while (!$this->conn->EndOfSeek()) {
         $row = $this->conn->Row();
         $arr[$i]['userID'] = $row->userID;
         $arr[$i]['name'] = $row->name;
         $arr[$i]['globalRoleID'] = $row->globalRoleID;
         $arr[$i]['mail'] = $row->mail;
         $arr[$i]['active'] = $row->active;
         $arr[$i]['trash'] = $row->trash;
         if ($row->password != '' && $row->password != '0') {
             $arr[$i]['passwordSet'] = "yes";
         } else {
             $arr[$i]['passwordSet'] = "no";
         }
         $i++;
     }
     return $arr;
 }
开发者ID:kimai,项目名称:kimai,代码行数:43,代码来源:Mysql.php

示例2: memberList

 public function memberList()
 {
     $db = new MySQL(true, 'color64', 'localhost', 'color64', 'nu5Jc4JdtZK4RCHH');
     $q = $db->Query("SELECT `id`,`name` FROM `users` WHERE `id` > 1 ORDER BY `id` ASC;");
     $mlist = array();
     while (!$db->EndOfSeek()) {
         $l = $db->Row();
         $mlist[$l->id] = strtoupper($l->name);
     }
     return $mlist;
 }
开发者ID:vlhorton,项目名称:color64,代码行数:11,代码来源:members.php

示例3: startFillSpecificPrice

 function startFillSpecificPrice()
 {
     $sql = "SELECT * FROM erp_sconti_scaglione ORDER BY priority ASC";
     $db = new MySQL();
     $db->Query($sql);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $row[] = $db->Row();
         }
     }
     $this->_GLOBAL_COUNTER = 0;
     foreach ($row as $sconto_erp) {
         $specific_price = new \stdClass();
         $specific_price->priority = $sconto_erp->priority;
         if (!empty($sconto_erp->CDprodotto) and !empty($sconto_erp->CDanag)) {
             $infoReduction = explode(";", $this->calculateREduction(array($sconto_erp->NRsconto)));
             $cdprodotto = $sconto_erp->CDprodotto;
             $cdanag = $sconto_erp->CDanag;
             $specific_price->price = $sconto_erp->Nrprezzo;
             $specific_price->from_quantity = $sconto_erp->NRqtaLimite;
             $specific_price->reduction = $infoReduction[0];
             if ($specific_price->reduction == 1) {
                 $specific_price->reduction = 0;
             }
             $specific_price->reduction_type = "percentage";
             if ($specific_price->reduction == 0) {
                 $specific_price->reduction_type = "amount";
             }
             $specific_price->from = $sconto_erp->Dtinizio;
             $specific_price->to = $sconto_erp->Dtfine;
             $specific_price->stringSconto = $infoReduction[1];
             $specific_price->type = $sconto_erp->priority . "_" . $sconto_erp->id;
             $id_product = $this->getIdProductFromCode($cdprodotto);
             $id_customer = $this->getCustomerIdFromCode($cdanag);
             if ($sconto_erp->Nrprezzo == 0.0) {
                 if (PROPAPAGAZIONE_LISTINI_CLIENTI == 1 && isset($this->_APP1O_LIST_BASE[$cdanag])) {
                     $appo_split = explode("_", $this->_APPO_LIST_BASE[$cdanag]);
                     $id_listino = $appo_split[0];
                     $list_sconto = $appo_split[1];
                     $specific_price->price = $this->_GROUP_MISTO_PER_LISTINI[$id_listino][$list_sconto]['specific_price'][$cdprodotto]->price;
                 } else {
                     $specific_price->price = -1;
                 }
             }
             $id_group = 0;
             if ($cdanag == "CCORRI") {
                 $id_customer = null;
                 $id_group = 1;
             }
             if ($id_product != null and $id_group == 1) {
                 $this->checkIfExistsHighPriceRuleCCORRI($specific_price, $id_product);
             }
             if ($id_customer != null and $id_product != null) {
                 $this->checkIfExistsHighPriceRule($specific_price, $id_product, $id_customer);
             }
         } else {
             if (!empty($sconto_erp->CDprodotto) and !empty($sconto_erp->Cdcatcli)) {
                 foreach ($this->ERP_CATCUSTOMER[$sconto_erp->Cdcatcli] as $cdanag) {
                     $infoReduction = explode(";", $this->calculateREduction(array($sconto_erp->NRsconto)));
                     $cdprodotto = $sconto_erp->CDprodotto;
                     $specific_price->price = $sconto_erp->Nrprezzo;
                     $specific_price->from_quantity = $sconto_erp->NRqtaLimite;
                     $specific_price->reduction = $infoReduction[0];
                     if ($specific_price->reduction == 1) {
                         $specific_price->reduction = 0;
                     }
                     $specific_price->reduction_type = "percentage";
                     if ($specific_price->reduction == 0) {
                         $specific_price->reduction_type = "amount";
                     }
                     $specific_price->from = $sconto_erp->Dtinizio;
                     $specific_price->to = $sconto_erp->Dtfine;
                     $specific_price->stringSconto = $infoReduction[1];
                     $specific_price->type = $sconto_erp->priority . "_" . $sconto_erp->id;
                     $id_product = $this->getIdProductFromCode($cdprodotto);
                     $id_customer = $this->getCustomerIdFromCode($cdanag);
                     if ($sconto_erp->Nrprezzo == 0.0) {
                         if (PROPAPAGAZIONE_LISTINI_CLIENTI == 1 && isset($this->_APP1O_LIST_BASE[$cdanag])) {
                             $appo_split = explode("_", $this->_APPO_LIST_BASE[$cdanag]);
                             $id_listino = $appo_split[0];
                             $list_sconto = $appo_split[1];
                             $specific_price->price = $this->_GROUP_MISTO_PER_LISTINI[$id_listino][$list_sconto]['specific_price'][$cdprodotto]->price;
                         } else {
                             $specific_price->price = -1;
                         }
                     }
                     $id_group = 0;
                     if ($cdanag == "CCORRI") {
                         $id_customer = null;
                         $id_group = 1;
                     }
                     if ($id_product != null and $id_group == 1) {
                         $this->checkIfExistsHighPriceRuleCCORRI($specific_price, $id_product);
                     }
                     if ($id_customer != null and $id_customer != "" and $id_product != null) {
                         $this->checkIfExistsHighPriceRule($specific_price, $id_product, $id_customer);
                     }
                 }
             } else {
//.........这里部分代码省略.........
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:101,代码来源:PSListini.php

示例4:

// --- Query and show the data --------------------------------------
// (Note: $db->Query also returns the result set)
if ($db->Query("SELECT * FROM Test")) {
    echo $db->GetHTML();
} else {
    echo "<p>Query Failed</p>";
}
// --- Getting the record count is easy -----------------------------
echo "\n<p>Record Count: " . $db->RowCount() . "</p>\n";
// --- Loop through the records -------------------------------------
while ($row = $db->Row()) {
    echo $row->Color . " - " . $row->Age . "<br />\n";
}
// --- Loop through the records another way -------------------------
$db->MoveFirst();
while (!$db->EndOfSeek()) {
    $row = $db->Row();
    echo $row->Color . " - " . $row->Age . "<br />\n";
}
// --- Loop through the records with an index -----------------------
for ($index = 0; $index < $db->RowCount(); $index++) {
    $row = $db->Row($index);
    echo "Row " . $index . ":" . $row->Color . " - " . $row->Age . "<br />\n";
}
// --- We can even grab array data from the last result set ---------
$myArray = $db->RecordsArray();
// --- List all of the tables in the database -----------------------
$tables = $db->GetTables();
foreach ($tables as $table) {
    echo $table . "<br />\n";
}
开发者ID:kimai,项目名称:kimai,代码行数:31,代码来源:example.php

示例5: getCategoryStringForLayeredTemplate

 function getCategoryStringForLayeredTemplate()
 {
     $db = new MySQL();
     $sql = "SELECT id_category FROM ps_category WHERE id_category > 1";
     $result = $db->Query($sql);
     while (!$db->EndOfSeek()) {
         $row[] = $db->Row();
     }
     $categoryArray = array();
     foreach ($row as $id_category) {
         $categoryArray[] = $id_category->id_category;
     }
     return $categoryArray;
 }
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:14,代码来源:PSFeature.php

示例6: backupDatabase

 function backupDatabase($dbName, $backupStructure = true, $backupData = true, $backupFile = null)
 {
     $columnName = 'Tables_in_' . $dbName;
     $this->done = false;
     $this->output .= "-- SQL Dump File \n";
     $this->output .= "-- Generation Time: " . date('M j, Y') . " at " . date('h:i:s A') . " \n\n";
     $this->output .= "-- \n";
     $this->output .= "-- Database: `{$dbName}` \n";
     $this->output .= "-- \n\n";
     $conn = new MySQL(true, DBNAME, DBHOST, DBUSER, DBPASS, "", true);
     $strTables = 'SHOW TABLES';
     $conn->Query($strTables);
     $cntTables = $conn->RowCount();
     if ($cntTables) {
         $conn->MoveFirst();
         while (!$conn->EndOfSeek()) {
             $rsTables = $conn->Row();
             if ($backupStructure) {
                 $this->dumpTableStructure($rsTables->{$columnName});
             }
             if ($backupData) {
                 $this->dumpTableData($rsTables->{$columnName});
             }
         }
     } else {
         $this->output .= "-- \n";
         $this->output .= "-- No tables in {$dbName} \n";
         $this->output .= "-- \n";
     }
     if (!is_null($backupFile)) {
         $this->dumpToFile($backupFile);
     }
     $this->done = true;
 }
开发者ID:aliihaidar,项目名称:pso,代码行数:34,代码来源:backup.class.php

示例7: resetImages

 /**
  * Resetta le immagini del prodotto
  * 
  * @param int $id_product Id del prodotto
  */
 function resetImages($id_product)
 {
     $sql = "SELECT id_image FROM ps_image WHERE id_product = {$id_product}";
     $db = new MySQL();
     $db->Query($sql);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $row[] = $db->Row();
         }
         foreach ($row as $appoRow) {
             $this->reinitImageLang($appoRow->id_image);
             $this->reinitImageShop($appoRow->id_image);
         }
     }
 }
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:21,代码来源:PSProduct.php

示例8: getEnabledCustomer

 /**
  * Metodo utilizzato per recuperare tutti gli utenti attivi in Prestashop
  * 
  * @return type
  */
 function getEnabledCustomer()
 {
     $sql = "SELECT * FROM ps_customer WHERE active = 1";
     $db = new MySQL();
     $db->Query($sql);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $appoRow = $db->Row();
             $row[] = $appoRow->id_customer;
         }
     }
     return $row;
 }
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:19,代码来源:PSCustomer.php

示例9: getGroupId

 /**
  * Metodo che seleziona i gruppi dalla tabelal ps_group
  * @return Object Lista di strutture contenente id_group per ogni gruppo
  */
 function getGroupId()
 {
     $db = new MySQL();
     $sql = "SELECT id_group FROM ps_group";
     $db->Query($sql);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $row[] = $db->Row();
         }
     }
     return $row;
 }
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:17,代码来源:PSCategory.php

示例10: getIndirizzi

 /**
  * Metodo per a creazione del file di indirizzi (indirizzi fatturazione - spedizione)
  */
 function getIndirizzi()
 {
     /*
      * La richiesta � quella di gestire anche un 4� file, denominato FWINDIRIZZI, che contenga tutti gli indirizzi di spedizione.
      * 
      * 
      */
     $query = "SELECT \n\t\tid_address,\n\t    customer_code,\n\t\tcompany,\n\t\tfirstname,\n\t\tlastname,\n\t\tCONCAT(address1, ' ', address2) as full_address,\n\t\tpostcode,\n\t\tcity,\n\t\tstate_name,\n\t\tphone,\n\t\tphone_mobile,\n\t\tvat_number\n\t\t\n\t\tFROM ps_address \n\t\tLEFT JOIN (SELECT code as customer_code, id_customer from ps_customer) AS ps_customer_joined  ON ps_customer_joined.id_customer = ps_address.id_customer\n\t\tLEFT JOIN (SELECT name as state_name, id_state from ps_state) as ps_state_joined ON ps_state_joined.id_state = ps_address.id_state\n\t\t\n\t\tWHERE ((synch = 0)AND(NOT(alias LIKE 'fatturazione')))";
     $db = new MySQL();
     $db->Query($query);
     $row = NULL;
     if ($db->RowCount() > 0) {
         while (!$db->EndOfSeek()) {
             $row[] = $db->Row();
         }
     }
     foreach ($row as $anag) {
         /* DOC: 2.1) TABELLA FWINDIRIZZI (1)
         		  		La tabella FWINDIRIZZI potr� avere un tracciato record ricavato da quello della tabella �ps_address� di Presta Shop:
         		  		Campo	Valori	Chiave	Descrizione campo
         		  		ID_Address	int	si	Numero univoco indirizzo
         		  		CdCustomer	char(50)	no	Codice del cliente, ricavato dalla tabella ps_customer
         		  		Company	char(64)	no	Ragione sociale
         		  		Cognome	char(32)	no	Cognome, da concatenare con Nome e importare in DestDiv.Des2Dest
         		  		Nome	char(32)	no	Vedi sopra
         		  		Address	char(128)	no	Indirizzo
         		  		Zip	char(12)	no	Codice Avviamento Postale
         		  		City	char(64)	no	Localit�
         NB. -> ripetizione. elimino =>		City	char(64)	no	Localit�
         		  		Prov	char(5)	no	Sigla Provincia, ricavato da ID_State o ID_Country ?
         		  		Phone	char(32)	no	Telefono
         		  		PhoneMob	char(32)	no	Cellulare, da importare in Contatto
         		  		VATnum	char(32)	no	Partita IVA
           		*/
         $stringa = null;
         $stringa[] = $anag->id_address;
         $stringa[] = $anag->customer_code;
         $stringa[] = !empty($anag->company) ? $anag->company : "-Senza Ragione Sociale-";
         $stringa[] = !empty($anag->lastname) ? $anag->lastname : "-Senza Cognome-";
         $stringa[] = !empty($anag->firstname) ? $anag->firstname : "-Senza Nome-";
         $stringa[] = !empty($anag->full_address) ? $anag->full_address : "-Senza Indirizzo-";
         $stringa[] = $anag->postcode;
         $stringa[] = $anag->city;
         $stringa[] = $anag->state_name;
         $stringa[] = $anag->phone;
         $stringa[] = $anag->phone_mobile;
         $stringa[] = !empty($anag->vat_number) ? $anag->vat_number : "-Senza Partita Iva-";
         file_put_contents($this->fileFWINDIRIZZI, iconv(mb_detect_encoding(implode("§", $stringa), mb_detect_order(), true), "UTF-8", implode("§", $stringa)) . "\r\n", FILE_APPEND);
         $this->setAnagraficaSynchronized($anag->id_address);
         /*
           		$stringa = null;
           		$stringa[] = $this->fillCodeClientiWithZero($this -> getCodeClienti(), $anag -> id_customer);
           		// CDute [0]
           		$appo = null;
           		$appo = $this -> getSIngleAnagFromId($anag -> id_customer);
           		if (!empty($appo -> company)) {
           			$stringa[] = $appo -> company;
           			// DSRaso [1]
           		} else {
           			$stringa[] = "-Senza Ragione Sociale-";
           	
           		}
           		if (!empty($anag -> lastname)) {
           			$stringa[] = $anag -> lastname;
           			// DSCognome [2]
           		} else {
           			$stringa[] = "-Senza Cognome-";
           		}
           		if (!empty($anag -> firstname)) {
           			$stringa[] = $anag -> firstname;
           			// DSnome [3]
           		} else {
           			$stringa[] = "-Senza Nome-";
           		}
           		if (!empty($appo -> vat_number)) {
           			$stringa[] = $appo -> vat_number;
           			// DSpiva [4]
           		} else {
           			$stringa[] = "-Senza Partita Iva-";
           		}
           		if (!empty($appo -> dni)) {
           			$stringa[] = $appo -> dni;
           			// DScod_fis [5]
           		} else {
           			$stringa[] = "-Senza Codice Fiscale-";
           		}
           	
           		$stringa[] = $appo -> address1;
           		// DSindi [6]
           		$stringa[] = $appo -> postcode;
           		// DScap [7]
           		$stringa[] = $appo -> city;
           		// DSloca [8]
           		$stringa[] = $this -> getStateFromId($appo -> id_state);
           		//$stringa[] = "";                                                              // DSprov [9]
           		$stringa[] = $appo -> phone;
           		// DStel [10]
//.........这里部分代码省略.........
开发者ID:addomine,项目名称:Vision-eCommerce,代码行数:101,代码来源:ps2erp.php


注:本文中的MySQL::EndOfSeek方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。