本文整理汇总了PHP中Connect::executeQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::executeQuery方法的具体用法?PHP Connect::executeQuery怎么用?PHP Connect::executeQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::executeQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertToOTD
function insertToOTD($orderId, $discountId, $discountAmount)
{
if (isset($discountId) && $discountId != 0) {
$insertQuery = "INSERT INTO OrderToDiscounts (orderId,discountId,discountAmount)\n\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$discountId},{$discountAmount})";
parent::executeQuery($insertQuery);
}
}
示例2: insertToAdmins
function insertToAdmins($title, $fname, $mname, $lname, $address, $city, $state, $zip, $homeTel, $workTel, $cellTel, $contactPerson, $contactTel)
{
$insertQuery = "INSERT INTO Admins (title,fname,mname,lname,address,city,state,zip,homeTel,workTel,cellTel,contactPerson,contactTel,passwd,email)\n\t\t\t\t VALUES ('{$title}','{$fname}','{$mname}','{$lname}','{$address}','{$city}','{$state}','{$zip}','{$homeTel}','{$workTel}','{$cellTel}','{$contactPerson}','{$contactTel}',MD5('{$this->email}'),'{$this->email}')";
parent::executeQuery($insertQuery);
$query = "SELECT LAST_INSERT_ID()";
$rs = parent::query($query);
return parent::validateIndexes($rs, 0, 'last_insert_id()');
}
示例3: insertToCTP
function insertToCTP($categId, $prodId)
{
if ($this->categId == 0 || $this->prodId == 0) {
$insertQuery = "INSERT INTO ProdsToCategs\t(categId,prodId)\n\t\t\t\t\t\t\t\t VALUES\t\t\t({$categId},{$prodId})";
} else {
$insertQuery = "INSERT INTO Categories\t(categId,prodId) \n\t\t\t\t\t\t\t\t\t\t VALUES\t\t({$this->categId},{$this->prodId})";
}
parent::executeQuery($insertQuery);
}
示例4: insertToOD
function insertToOD($name, $classification, $methodInitialCost, $methodPercentageCost, $status)
{
if ($this->discountId == 0) {
$insertQuery = "INSERT INTO Discounts (name,classification,,methodInitialCost,methodPercentageCost,status)\n\t\t\t\t\t\t\t\t VALUES ('{$name}','{$description}','{$methodInitialCost}','{$status}','{$methodPercentageCost}')";
} else {
$insertQuery = "INSERT INTO Discounts (name,classification,,methodInitialCost,methodPercentageCost,status,discountId) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$name}','{$description}','{$methodInitialCost}','{$methodPercentageCost}','{$status}',{$this->discountId})";
}
parent::executeQuery($insertQuery);
}
示例5: insertToOPM
function insertToOPM($name, $classification, $methodInitialCost, $methodPercentageCost, $status)
{
if ($this->paymentMethId == 0) {
$insertQuery = "INSERT INTO PaymentMethods (name,classification,,methodInitialCost,methodPercentageCost,status)\n\t\t\t\t\t\t\t\t VALUES ('{$name}','{$classification}','{$methodInitialCost}','{$methodPercentageCost}','{$status}')";
} else {
$insertQuery = "INSERT INTO PaymentMethods (name,classification,,methodInitialCost,methodPercentageCost,status,paymentMethId) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$name}','{$classification}','{$methodInitialCost}','{$methodPercentageCost}','{$status}',{$this->paymentMethId})";
}
parent::executeQuery($insertQuery);
}
示例6: max
function max()
{
$maxQuery = "SELECT max(orderId) FROM Orders";
$rs = parent::executeQuery($maxQuery);
$maxInArray = $rs->fields;
if (!isset($maxInArray['max(orderId)'])) {
return 0;
} else {
return $maxInArray['max(orderId)'];
}
}
示例7: destroy
function destroy($sessId)
{
//print "destroy";
$query = "DELETE FROM Sessions WHERE sessId='{$sessId}'";
if (($result = parent::executeQuery($query)) === false) {
return false;
} else {
setcookie("storez", '', time() - 86400, "/", '', 1);
return true;
}
}
示例8: insertToProducts
function insertToProducts($categId, $name, $description, $price, $status)
{
/* if (productId == 0)
Use Auto_Increment to assign productId field
else
Assign the value passed in Constructor */
if ($this->productId == 0) {
$insertQuery = "INSERT INTO Products (categId,name,description,price,status)\n\t\t\t\t\t\t\t\t\t VALUES ({$categId},'{$name}','{$description}',{$price},{$status})";
} else {
$insertQuery = "INSERT INTO Products (categId,name,description,price,status,productId) \n\t\t\t\t\t\t\t\t\t\t\tVALUES ({$categId},'{$name}','{$description}',{$price},{$status},{$this->productId})";
}
parent::executeQuery($insertQuery);
}
示例9: insertToCategs
function insertToCategs($parentId, $name, $description, $position)
{
/* if (categid == 0)
Use Auto_Increment to assign categId field
else
Assign the value passed in Constructor */
if ($this->categId == 0) {
$insertQuery = "INSERT INTO Categories (parentId,name,description,position)\n\t\t\t\t\t\t\t\t VALUES ({$parentId},'{$name}','{$description}',{$position})";
} else {
$insertQuery = "INSERT INTO Categories (parentId,name,description,position,categId) \n\t\t\t\t\t\t\t\t\t\t VALUES ({$parentId},'{$name}','{$description}',{$position},{$this->categId})";
}
parent::executeQuery($insertQuery);
}
示例10: insertToOTP
function insertToOTP($orderId, $basket)
{
$size = sizeof($basket);
for ($i = 0; $i < $size; $i++) {
$productId = $basket[$i][0];
$productQuantity = $basket[$i][1];
if ($this->orderId == 0) {
$insertQuery = "INSERT INTO OrderToProds (orderId,productId,productQuantity)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$productId},{$productQuantity})";
} else {
$insertQuery = "INSERT INTO OrderToProds (orderId,productId,productQuantity)\n VALUES ({$this->orderId},{$productId},{$productQuantity})";
}
parent::executeQuery($insertQuery);
}
}
示例11: deleteUser
function deleteUser($uid)
{
$query = "SELECT pic FROM Pics WHERE userId='{$uid}'";
$pics = parent::query($query);
//print_r($pics);
foreach ($pics as $outer) {
foreach ($outer as $pic) {
$rmOrig = "./images/{$pic}";
$rmThumb = "./images/thb_{$pic}";
$rmPop = "./images/pop_{$pic}";
$out = unlink($rmOrig);
$out = unlink($rmThumb);
$out = unlink($rmPop);
}
}
$query = "DELETE from Pics WHERE userId = '{$uid}'";
parent::executeQuery($query);
$query = "DELETE from Users WHERE userId = '{$uid}'";
return parent::executeQuery($query);
}
示例12: insertToOTPM
function insertToOTPM($orderId, $paymentId, $paymentCost, $paymentAmount)
{
$insertQuery = "INSERT INTO OrderToPaymentMeths (orderId,paymentId,paymentCost,paymentAmount)\n\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$paymentId},{$paymentCost},{$paymentAmount})";
parent::executeQuery($insertQuery);
}
示例13: insertToStores
function insertToStores($address, $city, $state, $zip, $telephone)
{
$insertQuery = "INSERT INTO Stores (name,address,city,state,zip,telephone)\n\t\t VALUES ('{$this->storeName}','{$address}','{$city}','{$state}','{$zip}','{$telephone}')";
parent::executeQuery($insertQuery);
}
示例14: insertToOTU
function insertToOTU($orderId, $userId)
{
$insertQuery = "INSERT INTO OrderToUser (orderId,userId)\n\t\t\t\t\t\t\t\t\t\tVALUES\t({$orderId},{$userId})";
parent::executeQuery($insertQuery);
}
示例15: insertToTax
function insertToTax($storeId, $taxZone, $rate, $description)
{
$insertQuery = "INSERT INTO Orders (storeId,taxZone,rate,description) \n\t\t\t\t\t\t\t\t\tVALUES ({$storeId},{$taxZone},{$rate},'{$description}')";
parent::executeQuery($insertQuery);
}