Insert into column if other column =
I have a normal insert page, but I want to insert data into one of the columns depending on the value of another 2.
For example, if field1 = 1000 OR 2000 AND if field2 = 2 OR 3 then insert 'red' into field3.
I have a normal insert page, but I want to insert data into one of the columns depending on the value of another 2.
For example, if field1 = 1000 OR 2000 AND if field2 = 2 OR 3 then insert 'red' into field3.
You could use some php code in the binding for field 3:
<?php echo((($_POST['field1_form_field'] == "1000" || $_POST['field1_form_field'] == "2000") || ($_POST['field2_form_field'] == "2" || $_POST['field2_form_field'] == "3"))?"red":"green"); ?>
I'm assuming you are inserting the values for field1 and field2 on this page as well, but basically you need to write an if statement like this one to achieve that result.
Thank you, That worked.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.