Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Macintosh Populate a dropdown with SQL Query

    Hi All,

    I'm in a bit of a sticky situation where I need some help with a bit of sql code, its not my forte.

    I have 2 tables the first is recipients, which contains customer information, the second is appointments, which contains details of appointments that can be booked.

    What I need to do is create an online booking form where if an appointment is booked, the booked appointment disappears from the drop down. A guy I've been chatting with on another forum said it might be possible using SQL, but he had no idea where to start either.

    Could someone, anyone help me out by pointing me in the right direction?

    Cheers

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    It would help if you had shown us your SCHEMA. That is, the names and types of at least the relevant fields in the two tables.

    It would also help if you showed us your existing web server code. (PHP? ASP? JSP? Or???)

    SQL can eliminate the already-used appointments from the records returned, but you still need to use web server code to convert the records to a <SELECT>.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    It would help if you had shown us your SCHEMA. That is, the names and types of at least the relevant fields in the two tables.

    It would also help if you showed us your existing web server code. (PHP? ASP? JSP? Or???)

    SQL can eliminate the already-used appointments from the records returned, but you still need to use web server code to convert the records to a <SELECT>.
    Hi, no problem.

    Recipient schema is below:

    Title, Forename, Surname, client_urn, add1 - 6, postcode, tel, email, fc, fc_manager, appointment_id

    Appointment schema is below:
    appointment, appointment_date, appointment_time

    I don't currently have any exisiting code for this campaign, and we'r integrating it with a marketing software called XMPie, most of the pages use C# script, but are saved as aspx pages (if this helps?)

  • #4
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Can anyone offer any assistance?


  •  

    Posting Permissions

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