Jump to content

boney alex

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by boney alex

  1. hi wildbug, i tried that code but just like my attempts, it failed to recognise the other vehicle DY53 WAJ, because that isnt in the reservation table.
  2. Hi, Im currently building a vehicle rental website. Im workin on a query which is trying to select potential vehicles for reservation but only if it satisfies some certain characteristics: 1) it must be held at the branch (ive been using BranchID = 1 for test purposes) 2) it must be of a certain make and model (ive been using MakeModelID = 3 for test purposes) 3) the query must EXCLUDE those vehicles currently reserved. For this I've been using NOT BETWEEN Collect_Date AND Return_Date. Table Vehicle VehicleID Registration MakeModelID BranchID 1 AE02 FWC 3 1 2 DY53 WAJ 3 1 Table Reservation ReserID CustID VehicleID Collect_Date Return_Date 1 1 1 2007-04-04 2007-04-11 I need a query that will show both AE02 FWC and DY53 WAJ if the user selects: * 3 for the MakeModelID * 1 for the BranchID * 2007-04-12 for the collect date And only show DY53 WAJ if the collect date was for example 2007-04-09. Any help would be much appreciated. Thanks. Alex
  3. my code manages to produce the drop down as you can see by visiting: http://co-project.lboro.ac.uk/users/coajs/quoteandbook What I'm strugglin with is once a user selects a van type from the drop down list, how do I capture the MakeModelID for the option selected?
  4. do you mind explaining what code I've missed out phoenix?
  5. Hi, I'm fairly new to PHP and I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected. <fieldset> <legend>Please select the Type of Van</legend> <?php $result = mysql_query("SELECT MakeModelID, Make, Model, Specification FROM MakeandModel ORDER BY Make, Model, Specification"); ?> <label for="branch">Type of Van:</label> <select name="vantype" STYLE="width: 220px" size="0"> <option selected value=""></option> <?php while ($row = mysql_fetch_array($result)) { echo "<option value=\"$row[MakeModelID]\">$row[Make] $row[Model] $row[specification]</option>\n"; } ?> </select><br> </fieldset> Any help would be much appreciated. Thanks! Alex
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.