Jump to content

Search the Community

Showing results for tags 'populate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. 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 } } ?> SUBMENU displays all the details in bid table column auction bidder willwin willlose 38 4 3 2 39 4 2 4 39 5 4 2 the result should have a display for column ((auction) 38) willwin (3) but instead i get 3,2,4 <?php include('config.php'); $menu = $_GET['menu']; $query = mysql_query("SELECT a.id, s.team_id, s.teams, u.nick, b.id, b.willwin, b.willlose, b.bidder FROM vs_bids b LEFT JOIN " . $DBPrefix . "vs_users u ON (u.id = b.bidder) LEFT JOIN " . $DBPrefix . "vs_auctions a ON (a.id = b.auction) LEFT JOIN " . $DBPrefix . "vs_sports s ON (s.team_id = b.willwin) WHERE willlose='$menu' and a.id = b.auction and b.bidder NOT IN ('b.tagged') and b.tagged IN ('b.bidder')"); while($row = mysql_fetch_array($query)) { echo "<option value=''></option>"; echo "<option value='$row[team_id]'>$row[nick]...$row[teams]</option>"; } ?> i cant seem to introduce b.auction = :auc_id which will help in displaying the correct result, but once have converted it like the menu above but doesnt seem to work, so i converted it back. please need help with the issue here, thanks.
  2. hi programmers how u doing? i need help creating a sub menu but with a twist MENU Submenu- team1 on click will display dropdown list of team2 lists team2 on click will display dropdown list of team1 lists if a user select (team1) it should drop down list of [team2] and if the user select (team2) it should drop list of [team1]. the code below is only a menu without submenu need ur assistance, thanks alot // team select $query = "SELECT a.id, a.team1, a.team2, b.auction, b.bidder, b.tagged, b.willwin FROM " . $DBPrefix . "auctions a LEFT JOIN " . $DBPrefix . "bids b ON (b.auction = a.id) WHERE a.id = :auc_id and a.id = a.id group by a.id"; $params = array(); $params[] = array(':auc_id', $id, 'int'); $db->query($query, $params); $TPL_team_list = '<select name="willwin" class="form-control">' . "\n"; while ($row = $db->fetch()) { $TPL_team_list .= "\t" . ' <option value="' . $row[''] . '" ' . $selected . '>' . $row[''] . '</option> <option value="' . $row['team1'] . '" ' . $selected . '>' . $row['team1'] . '</option> <option value="' . $row['team2'] . '" ' . $selected . '>' . $row['team2'] . '</option> ' . "\n"; } $TPL_team_list .= '</select>' . "\n"; { $template->assign_block_vars('tag_bidder', array( 'TEAM' => $TPL_team_list, )); $i++; } Tables : auctions columns: id(int), team1, team2 3 chelsea ajax Tables : bids columns: auction(int) bidder willwin 3 9 chelsea 3 5 ajax 3 7 chelsea 3 2 ajax 3 6 chelsea 3 4 chelsea
×
×
  • Create New...