I have one query to execute two things,
Expand|Select|Wrap|Line Numbers
- echo "<TD class=\"main\"><SELECT NAME=\"current_product_id\">";
- $query = "SELECT * FROM ".TABLE_PRODUCTS_DESCRIPTION." where products_id LIKE '%' AND language_id = '" . $_SESSION['languages_id'] . "' ORDER BY products_name ASC";
- $result = xtc_db_query($query);
- $matches = xtc_db_num_rows($result);
- if ($matches) {
- while ($line = xtc_db_fetch_array($result)) {
- $title = $line['products_name'];
- $current_product_id = $line['products_id'];
- echo "<OPTION VALUE=\"" . $current_product_id . "\">" . $title;
- }
(i.e) here i used products_description table and displayed $current_product_id = products_id, $title = products_name in option value.
now i want to take the category name from another table for the selected product and i should display with the $title like
<option value = "1234">yellow color($title) - color(category name)</option>