BFH Handwriting Downloads: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:BFH HandwritingCategory:Web Development == Reseting download count == <syntaxhighlight lang="mysql"> select p.catno, p.name, i.download_token, i.download_coun...") |
|||
| Line 1: | Line 1: | ||
[[Category:BFH Handwriting]][[Category:Web Development]] | [[Category:BFH Handwriting]][[Category:Web Development]] | ||
== | == Verifying download count == | ||
<syntaxhighlight lang="mysql"> | <syntaxhighlight lang="mysql"> | ||
select p.catno, | select p.catno, | ||
| Line 12: | Line 12: | ||
inner join cart_order o on i.order_id = o.id | inner join cart_order o on i.order_id = o.id | ||
inner join address b on o.billing_id = b.id | inner join address b on o.billing_id = b.id | ||
where i.order_id = | where i.order_id = [ORDER_ID]; | ||
</syntaxhighlight> | |||
== Reseting download count == | |||
<syntaxhighlight lang="mysql"> | |||
update order_item_link set download_count = 0 where order_id = [ORDER_ID] and product_id = [PRODUCT_ID]; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 04:53, 29 November 2016
Verifying download count
select p.catno, p.name, i.download_token, i.download_count, CONCAT(IFNULL(CONCAT(b.first_name, ' '), ''), IFNULL(b.last_name, '')) as customer, i.product_id from order_item_link i inner join catalog_item p on i.product_id = p.id inner join cart_order o on i.order_id = o.id inner join address b on o.billing_id = b.id where i.order_id = [ORDER_ID];
Reseting download count
update order_item_link set download_count = 0 where order_id = [ORDER_ID] and product_id = [PRODUCT_ID];