I have 2 tables on my mysql database : - restaurant - restaurant_type
restaurant has 3 column : id
, idtype
, name
Example :
- 1, 1-2, Restaurant name
- 2, 2-3-5, Restaurant name
restaurant_type has 2 column : idtype
, typename
Example :
- Salad
- Burger
- Steak house
- Japanese
- French fries
For that moment, my sql request is :
mysql_query("select distinct
restaurant.idtype,
restaurant_type.idtype,
restaurant_type.typename
from restaurant,restaurant_type
where restaurant.idtype=restaurant_type.idtype
order by restaurant_type.typename");
But I don't know how can I add explode function to search different idtype
.
An idea to help me ?
Thank you !