...

View Full Version : Populate a dropdown with SQL Query



Hayezy
01-11-2012, 04:58 PM
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

Old Pedant
01-11-2012, 08:05 PM
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>.

Hayezy
01-12-2012, 10:42 AM
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?)

Hayezy
01-17-2012, 04:49 PM
Can anyone offer any assistance?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum