File: no_discs.sql

package info (click to toggle)
opendb 0.81p18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,716 kB
  • ctags: 6,787
  • sloc: php: 50,213; sql: 3,098; sh: 272; makefile: 54; xml: 48
file content (20 lines) | stat: -rw-r--r-- 1,561 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
####################################################################################################
# Record no of discs in item.
#
# by Jason Pell & Eduardo Ediaz
####################################################################################################

# Cleanup first so this can be rerun.
DELETE from s_attribute_type WHERE s_attribute_type = 'NO_DISCS';
DELETE from s_item_attribute_type WHERE s_attribute_type = 'NO_DISCS';
DELETE from s_attribute_type_lookup WHERE s_attribute_type = 'NO_DISCS';

INSERT INTO s_attribute_type (s_attribute_type, description, prompt, input_type, display_type, s_field_type, site_type) VALUES ( 'NO_DISCS', 'Records no of Discs', 'Number of Disc(s)', 'value_select("1,2,3,4,5,6")', '%value%', NULL, NULL);

# Insert for DVD, add extra s_item_attribute type inserts for other types.
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'CD', 'NO_DISCS', '45', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'LD', 'NO_DISCS', '115', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'VCD', 'NO_DISCS', '105', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'DVD', 'NO_DISCS', '125', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'DIVX', 'NO_DISCS', '155', '', NULL);