www.webdeveloper.com
Results 1 to 3 of 3

Thread: Table problems as well....

  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Thumbs down Table problems as well....

    so...I am completely new to this and I am only doing it for a class project...kinda fun...but html sucks...anyway...

    I got the drop down menu to select the right company...so it then enters the "store ID" I selected into the right place....but then on my table it shows all my stores not just the one I selected...and I need it to show only the store I selected...what do I do?????

    Here is my code...

    %>
    </select>
    <br>
    <input type="Submit" value="Get store Info">
    </form>
    </body>
    </html>
    <% ELSE %>
    <html>
    <title>Your store inventory list</title>
    <body>
    <h1>Inventory List</h1>
    Here is the inventory list for your store:<BR>
    <form method="post" action="UpdateInventory.asp">
    <input type=hidden name=storeid value=<%=Request.form("StoreID")%> >
    The inventory list you chose is for store number
    <%
    SQL = "SELECT storeid FROM StoreManager where StoreID=" & Request.form("storeid")
    set theusers=conn.execute(SQL)
    response.write theusers(0)
    SQL = "SELECT dbo.StoreManager.storeid, dbo.Inventory.itemid, dbo.Items.productname, dbo.Items.price, dbo.Items.cost, dbo.Items.description, dbo.Inventory.quantityonhand, dbo.Inventory.reorderpoint FROM dbo.Inventory INNER JOIN dbo.StoreManager ON dbo.Inventory.storeid = dbo.StoreManager.storeid INNER JOIN dbo.Items ON dbo.Inventory.itemid = dbo.Items.itemid" & Request.form("storemanager where storeid")

    set theusers=conn.execute(SQL)
    %>
    <table border=1>
    <tr>
    <th>Store ID</th>
    <th>Item ID</th>
    <th>Item Name</th>
    <th>Selling Price</th>
    <th>order Cost</th>
    <th>Item Description</th>
    <th>Quantity on hand</th>
    <th>Reorder Point</th>
    </tr>
    <%
    do while not theusers.eof
    response.write("<tr><td>"& theusers(0) & "</td><td>" & theusers(1) & "</td><td>" & theusers(2) & "</td><td>$"& theusers(3) & "</td><td>$"& theusers(4) & "</td><td>"& theusers(5) & "</td><td>"& theusers(6) & "</td><td>"& theusers(7) & "</td><td>" & "</tr>")
    theusers.movenext
    loop
    %>


    Since I am new to this I think I have tried everything and it still is not working....Cindo

  2. #2
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774

  3. #3
    Join Date
    Nov 2003
    Location
    the Netherlands
    Posts
    304
    To begin with, change <th> and </th> into <td> and </td>.

    SORRY, this reply is nonsence. I take back my words. Good luck.

    Cheers, Jochem
    Last edited by jochem; 12-02-2003 at 08:25 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles