Re: How can I achieve this?
well, since you're matching model numbers in your query, if you want to show all available models then I'd think you would need to get rid of that. Now, I'm not sure how you would determine which models were available -- but I'm sure you do. so, create a WHERE clause in your query to reflect that.
Re: How can I achieve this?
Here's where I am:
I have all the tables I just talked about, and they all come together in the items table (all the foreign keys are there with their price).
I want to make an attractive way of displaying the information.
I can filter the items table by model_name (use inner join to join with the items table on the same mode_id). This way a query result of available models might return this:
1 5 (5 = model name 5)
1 6 (6 = model name 6)
1 7 (7 = model name 7)
... but I want to have this on my page:
Man 1, Make1, Available Models 5,6,7
I really want to combine results but not repeat the same information.
So I might even have this:
Man1, Make 1, Model 1, $200
Man 1, Make 1, Model 2, $200
.. but display:
Man1, Make 1, Model 1,2, $200
Or if this is in my recordset:
Man1, Make 1, Model1, $200
Man1, Make1, Model3, $400
to have this displayed:
Man1, Make1, Model1,3 , $200, $400
does that make sense?
I wonder how to do such things.
Re: How can I achieve this?
I think you might need to do a second query to return all of the prices and model numbers, if you're wanting to do that with just SQL. this could make everything very slow, though.
with php, though, it's possible to keep track of what record you're on and what the values of make and man are, and if they're the same as the last values of make/man, then you can keep displaying information as if it were the same row. if they change, you simply make a new row and start displaying the basic information again, and keep track of that make/man. do you understand what I'm getting at? I don't have any time to write anything down right now.
Re: How can I achieve this?
Thanks kows.
I got the jist of your response.
I am going to seriously sit down again tonight and think about the best seach method for my products.
Sometimes searching by too many fields is not the best for the user, either.
I spent all evening reading php at the bookstore, and my brain is fried now.
Better rest it... thanks again for now.