Jump to content

[SOLVED] mysql select question


giraffemedia

Recommended Posts

i've tried it, and it sort of works but it's duplicating one result rather than each one being different.

Is this a 1-to-1 relationship?

 

Do you mean does one record from one table relate to just one from the other fenway?

 

If that's the case then no - there are multiple rows from the booking_form table that relate to a specific row from the contacts table. Each time a new booking for the same client (from the contacts table) gets entered as a new row with an auto_incremental id. So there can be 1-many rows for each contact.

 

Hope this helps.

 

James

Link to comment
Share on other sites

fenway, i've got it to work by using the following.

 

$find_issues_query = "SELECT * FROM booking_form b INNER JOIN contacts c ON b.bf_company_id = c.contacts_id WHERE b.bf_company_id = c.contacts_id ORDER BY b.bf_id" or die(0);

 

Thanks for your help

 

James

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.