Am able to use this code to bind a.id = :auc_id in order to display certain result needed for menu code, but when i introduce it in the submenu i dont get any result below are the codes for menu and submenu'
MENU works fine, display whats need to be showned thanks to a.id = :auc_id
$query = "SELECT s.team_id, s.teams AS teams1, ss.team_id, ss.teams AS teams2, a.id, a.team1, a.team2 FROM " . $DBPrefix . "auctions a
LEFT JOIN " . $DBPrefix . "sports s ON (s.team_id = a.team1)
LEFT JOIN " . $DBPrefix . "sports ss ON (ss.team_id = a.team2)
WHERE a.id = :auc_id and a.id = a.id";
$params = array();
$params[] = array(':auc_id', $id, 'int');
$db->query($query, $params);
?>
<script type="text/javascript" src="js/dropdownjquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#menu").change(function() {
$(this).after('<div id="loader"><img src="images/loading.gif" alt="loading subcategory" /></div>');
$.get('loadsubcat.php?menu=' + $(this).val(), function(data) {
$("#sub_cat").html(data);
$('#loader').slideUp(200, function() {
$(this).remove();
});
});
});
});
</script>
<form name="bid">
<label for="category">Select Winner</label>
<select name="willwin" id="menu">
<?php
if ($db->numrows() > 0){
while ($row = $db->fetch()) { ?>
<option value=''></option>
<option value="<?php echo $row["team1"]; ?>"><?php echo $row["teams1"]; ?></option>
<option value="<?php echo $row["team2"]; ?>"><?php echo $row["teams2"]; ?></option>
<?php
}
}
?>