The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Contains a list of restaurants and input tag name above in the picture is where through an user will get through the restaurant table to look for an X restaurant.

What about if an user get to choose a food type of the select tags in the pictures, Then how can a query be formed to relate table one with table two which is called restaurant_food_types and is as below..

I am trying to import to mysql the format of the restaurant_foodtypes table into phpmyadmin in mysql 5.1 and it throw this error

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN KEY ( foodtypes_id) REFERENCES foodtypes (id)
PRIMARY KEY (`restauran' at line 12

I don't know how to structure the syntax for FOREIGN KEY and REFERENCES in this mysql version. I tried to do it like you did but it didn't work.

The mysql dump of the table restaurant_foodtypes in the mysql version in my computer dumps it as below without the FOREING KEY and REFERENCES you have add to it.