wrathican Posted July 12, 2007 Share Posted July 12, 2007 hey there what i have is two tables, one with tours and one with courses, why i didnt use one table to begin with is a mystery to me and might eventually happen, but until then i need to select data from both tables to show in a combo box in a form. im going to be using php to show them in the form, hopefully a while statement to show the selections available. what im wondering is how do i do this? what sort of query would it be? would i need to use two queries? im pretty confident at using while loops and selecting data from databases but not two tables at the same time. thanks in advanced guys Quote Link to comment Share on other sites More sharing options...
1042 Posted July 12, 2007 Share Posted July 12, 2007 A nice way to do this would be AJAX, you show Tours and based on the tour they select theywill get a drop down with the course belonging to each tour, im i correct? anyway, here is a good tutorial that help me when i had to do something similar to what you are doing now. http://www.scriptygoddess.com/archives/2007/02/13/store-locator-using-php-and-ajax/ you just need a few changes to customize it to you needs. Quote Link to comment Share on other sites More sharing options...
wrathican Posted July 13, 2007 Author Share Posted July 13, 2007 i had a look at that and i didnt like the look of it. what i want to happen, is to create a query to select the name and price from two tables, one called tours and one called courses, then display the titles in a drop down list on a form for the user to select which course/tour they are interested in going on. once the user selects a course/tour i want the price thats stored in the table for that course/tour to be displayed. the courses and tours are not the same thing, they are seperate but both contain similar data Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.