This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following will allow you to use URLs such as the following: | |
# | |
# example.com/anything | |
# example.com/anything/ | |
# | |
# Which will actually serve files such as the following: | |
# | |
# example.com/anything.html | |
# example.com/anything.php | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//From a forms_controller.php | |
if (!empty($this->passedArgs['query'])) { | |
$this->paginate = | |
array( | |
'conditions' => array( | |
'or' => | |
array( | |
'Form.title LIKE ' => '%' . $this->passedArgs['query'] . '%', | |
'Tag.title LIKE ' => '%' . $this->passedArgs['query'] . '%', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(*) AS `count` | |
FROM `forms` AS `Form` | |
LEFT JOIN forms_tags AS `FormsTags` ON (`Form`.`id` = `FormsTags`.`form_id`) | |
LEFT JOIN tags AS `Tag` ON (`FormsTags`.`tag_id` = `Tag`.`id`) | |
LEFT JOIN `statuses` AS `Status` ON (`Form`.`status_id` = `Status`.`id`) | |
LEFT JOIN `form_types` AS `FormType` ON (`Form`.`form_type_id` = `FormType`.`id`) | |
LEFT JOIN `summaries` AS `Summary` ON (`Form`.`summary_id` = `Summary`.`id`) | |
WHERE ((`Form`.`title` LIKE '%titl%') OR (`Tag`.`title` LIKE '%titl%')) | |
GROUP BY `Form`.`id` ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT count(distinct(`Form`.`id`)) as numberof | |
FROM `forms` AS Form | |
LEFT JOIN forms_tags AS `FormsTags` ON (`Form`.`id` = `FormsTags`.`form_id`) | |
LEFT JOIN tags AS `Tag` ON (`FormsTags`.`tag_id` = `Tag`.`id`) | |
LEFT JOIN `statuses` AS `Status` ON (`Form`.`status_id` = `Status`.`id`) | |
LEFT JOIN `form_types` AS `FormType` ON (`Form`.`form_type_id` = `FormType`.`id`) | |
LEFT JOIN `summaries` AS `Summary` ON (`Form`.`summary_id` = `Summary`.`id`) | |
WHERE ((`Form`.`title` LIKE '%titl%') OR (`Tag`.`title` LIKE '%titl%')) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class transfer extends App_BT_Object_Db { | |
/** | |
* Which single default database table relates to this object | |
*/ | |
protected $_sDefaultTable = 'indusoft_transfers'; | |
public function getAllEnabled() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'RotationalPool' => array( | |
'id' => '', | |
'name' => '', | |
'description' => '', | |
'abbrev' => '', | |
'duration' => array( | |
(int) 0 => array( | |
'ShiftBasic' => array( | |
'id' => '3', | |
'name' => 'Test', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
meta.name AS "Product Name", | |
CONCAT('A', location.aisle, ' S', location.shelf, ' B', location.bin) AS "Location", | |
( | |
SELECT | |
SUM(line.unit_price_at_checkout_time * line.quantity_shipped) | |
FROM orders_orderline AS line | |
INNER JOIN orders_order AS orders | |
ON orders.id = line.order_id | |
INNER JOIN products_product AS products |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires 1y; | |
} | |
http { | |
gzip on; | |
gzip_types | |
text/html | |
application/javascript | |
application/x-javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
o.id AS "Order Number", | |
o.order_date AS "Order Date", | |
o.invoice_date AS "Invoice Date", | |
o.cached_post_shipped_invoiced_total AS "Amount", | |
CASE o.order_status | |
WHEN 1 THEN 'In Cart' | |
WHEN 2 THEN 'Resumed' | |
WHEN 3 THEN 'Placed' | |
WHEN 4 THEN 'Queued' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
product.code AS itemcode, | |
floor(piece.cached_possible_stock_available_count) AS stock_available, | |
product.cached_name AS list_name, | |
product.cached_%s_price AS price, | |
barcode.barcode AS upc, | |
SUBSTRING(product.code, 0, 3) AS category, | |
CASE WHEN meta.is_organic THEN 'TRUE' | |
ELSE 'FALSE' | |
END AS organic, |
OlderNewer