Help reqd

Discussion in 'General troubleshooting' started by rishi, Jan 20, 2011.

  1. i have a project for ticket sale and computerised sale summary
    i have a MOVIE table as master with 3 fields date , name and show time (id an auto number field is generated auto) ALL ARE IN CAPITALS
    one table is called ticket with 4 fields ticket id (auto number), seat no( text field), ticket price(currrency) and show id(number)ALL ARE IN CAPITALS

    one table is login ALL ARE IN CAPITALS

    the master table for ticket is movie with primary key as id and foreign key in ticket is Show id and they are Linked
    similaly in sql qury i have linked these two tables
    the problem is as follow
    SAY FOR MOVIE X AT 3PM I BOOK A TICKET NUMBER 1 WITH SEAT NO A1 THEN FOR THE SAME SHOW THE SEAT SHOULD NOT BE AVAILABL AGAIN
    BUT FOR MOVIE X AT 7 PM THE SEAT SHOULD BE AVAILABLE
    I AM DAMN CONFSUED HOW TO ACHIEVE THIS
    REST ALL IS WORKING FINE
    PLZ HELP
     
  2. ...You're confusing me too. :)

    Do you mean you want an example of ASP.NET page code that will convert the data being pulled in from SQL Server?
     
  3. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Since I really don't know how you've designed your software, I can only offer a suggestion.

    You can write a stored procedure where you pass in parameters for SEAT_NO, NAME, and SHOWTIME to check to see if that ticket already exists in the database. You can then have your stored procedure return a true/false value.

    Here is some pseudo-code:

    SELECT TICKET.SEAT_NO, MOVIE.NAME, MOVIE.SHOWTIME FROM TICKET
    INNER JOIN MOVIE ON TICKET.SHOW_ID = MOVIE.ID

    IF EXISTS RETURN @TICKET_EXISTS
     
  4. hi

    i want help in asp runner pro
     

Share This Page