I'm new to PHP/MySQL and am rather stuck on something that I know is actually pretty easy. But for the life of me I can't seem to figure out how to get the data from one of my tables. Its been a long day and I'm hoping that tomorrow I might be a little more compus mentus and be able to figure this out...but just in case I really am stupid I thought I'd ask for some help from some pro's.
a user is browsing my site and ends up on the service information page. i need them to click on a link to open a new page showing the details of the boat that provides the service.
in my database i have the following 2 tables. there is a one-to-many relationship between my tables - one boat can have many services.
boats table:
boat_id
services table:
service_id
fk_boat_id
fk_boat_id is foreign key relating to boat_id
i'm passing a variable (service_id) and need to extract all columns from my boat table and display the data on my page. It seems pretty basic so I just don't know why I can't fathom it out. I'm totally stuck and could really do with a shove in the right direction. Please can anyone help?