function recipe_populate_units in Recipe 5
Same name and namespace in other branches
- 6 recipe.install \recipe_populate_units()
1 call to recipe_populate_units()
File
- ./
recipe.install, line 115
Code
function recipe_populate_units() {
$s = true;
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (1, 'Slice', 'sli', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (2, 'Unit', '', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (3, 'Clove', 'clv', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (4, 'Pinch', 'pn', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (5, 'Package', 'pk', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (6, 'Can', 'cn', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (7, 'Drop', 'dr', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (8, 'Bunch', 'bn', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (9, 'Dash', 'ds', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (10, 'Carton', 'ct', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (11, 'Cup', 'c', 0, 'Unit');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (12, 'Tablespoon', 'T', 0, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (13, 'Teaspoon', 't', 0, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (14, 'Pound', 'lb', 0, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (15, 'Ounce', 'oz', 0, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (16, 'Pint', 'pt', 0, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (17, 'Quart', 'q', 0, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (18, 'Gallon', 'gal', 0, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (19, 'Milligram', 'mg', 1, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (20, 'Centigram', 'cg', 1, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (21, 'Gram', 'g', 1, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (22, 'Kilogram', 'kg', 1, 'Mass');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (23, 'Millilitre', 'ml', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (24, 'Centilitre', 'cl', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (25, 'Litre', 'l', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (26, 'Decilitre', 'dl', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (27, 'Tablespoon (Metric)', 'tbsp', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (28, 'Teaspoon (Metric)', 'tsp', 1, 'Volume');");
$s = $s && db_query("INSERT INTO {recipe_unit} VALUES (29, 'Unknown', '', 0, 'Unit');");
return $s;
}