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
.field-item { | |
position: relative; | |
padding-bottom: 56.25%; /* - 16:9 aspect ratio (most common) */ | |
/* padding-bottom: 62.5%; - 16:10 aspect ratio */ | |
/* padding-bottom: 75%; - 4:3 aspect ratio */ | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
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 ----- | |
Ctrl Shfit + A = Select inner <tag> | |
----- ADD ----- | |
Alt Shfit + W = Create new <tag> | |
----- REMOVE ----- | |
Ctrl Shfit + K = Remove tail <tag> | |
Ctrl K , Ctrl + backspace = Del to head | |
Ctrl K, Ctrl K, = Del to end |
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 *, (quantity * price - reward) AS rewardDiff | |
FROM `oc_order_product` | |
WHERE `name` LIKE '%以上%' | |
AND (quantity * price - reward) < 0 | |
ORDER BY rewardDiff |
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
UPDATE oc_order_product SET reward = total | |
WHERE name LIKE '%以上%' | |
AND (quantity * price - reward) < 0 |
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
# Query penning status(1) | |
SELECT * FROM `oc_order` | |
WHERE (`order_id` BETWEEN 100 AND 200) | |
AND `order_status_id` = 1 | |
ORDER BY `order_status_id` | |
# Update: penning status(1) ONLY | |
UPDATE oc_order SET order_status_id = 5 | |
WHERE (`order_id` BETWEEN 100 AND 200) | |
AND `order_status_id` = 1 |
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 op.product_id, op.name, op.quantity, op.reward | |
FROM oc_order_product op, oc_product_reward pr, `oc_order` o | |
WHERE op.product_id = pr.product_id | |
AND o.customer_group_id = pr.customer_group_id | |
AND o.order_id = op.order_id | |
AND o.order_id = '1415' | |
AND points > 0 | |
AND o.customer_id > 0 |
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
DS15030247 | |
Coupon value: $12.7 | |
Total price(exclude shipping): $127 | |
Sys reward: 89 + 16 = 105 (less ) | |
Collect reward: $127 - $12.7 = 114.3 | |
Products qty: | |
10 + 1pcs | |
(RA)reward adjustment of coupon | |
$12.7 / 11 = 1.15 |
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 Composer | |
$ composer.phar self-update | |
$ composer.phar update --dev | |
$ vendor/bin/phpunit -c app/ | |
// MYSQL | |
$ mysql -uroot -p | |
mysql> show variables like '%sock%'; | |
/tmp/mysql.sock #Answer |
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 artisan migrate:refresh --seed | |
# nstead of issuing | |
$ php artisan migrate:reset | |
$ php artisan migrate | |
artisan env | |
-------------------------------------------------- | |
// After remove migrate file | |
composer dump-autoload |
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
#Detail | |
SELECT username,(cost) FROM posts, users | |
WHERE | |
consumer_id = 2 && | |
posts.payer_id = users.id && | |
payer_id <> 2 | |
#Summary | |
SELECT username,SUM(cost) FROM posts, users | |
WHERE |
OlderNewer