![]() |
Is this possible with SQL?
I have a table of recipes, all have unique id's.
What I'd like to be able to do is to add an article to a separate table, then, below that article on the .php page, display a listing of recipes from the first table that contain a specific keyword, such as 'bacon' to go with the article about bacon. Is it possible to run an SQL querie in the .php code to display the article AND, have another array below that that displays say, 5 records from the recipe table. I have a single article.php file that pulls based on the ID in the table containing articles, but not what the article is based on so article.php?id=1 for example, pulls up the bacon article. How do I make it so that I can also pull up JUST 5 recipes that also contain 'bacon' in their ingredients list? What is that called? Pulling from 2 different tables based on a specific keyword? If I need to I can add a category to both tables if that makes it any easier overall to achieve what I need? This is what I have currently for the article.php page: Quote:
Quote:
I was thinking I could use an include but that does not seem to be possible (?) :Oh crap Any pointers as to what I should be looking into (if even possible) would be appreciated :thumbsup |
Try looking up JOIN and/or UNION.
|
Quote:
|
All times are GMT -7. The time now is 03:37 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123