Jump to content

This topic is 6965 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Hi Guys,

Im sorry to be asking this but im in a bit of a tight squeeze. Ok i have a 3 tables on a mysql database.

table 1 - has people

table 2 - has images(just the filename the path)

table 3 - is the key between them both it uses ID numbers from each of the images and people table.(this is how i associate people with their images)

What im looking for is a php script that will allow me to search this setup. i also want an advanced search for instance i might want to search all people that live in England, Ireland and Canada.

Anyone ever dealt with this before if someone know where i can get my hands on a script so i can tweak it to work with my setup that would be great.

Any questions shout.

Thanks again,

D

Edited by Guest
Posted

The "OR" search could look like this:

SELECT people.*, images.filename

FROM people, images

WHERE people.country IN ('England', 'Ireland', 'Canada')

AND people.id = images.id

You can check the PHP website for sample scripts on how to use the mysql Functions.

All the best.

Garry

This topic is 6965 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.