|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
double select ?
Hello,
building a online news system and want to show in a web page categories and articles that are related to those categories. Table 1 Categories Cat_name cat_id Table 2 Articles Article Name cat id When the web page is displayed Category Name (cat_id =1) Article 1 cat_id 1 Article 2 cat_id 1 Article 3 cat_id 1 Category Name (cat_id = 2) Article 1 cat_id 2 Article 2 cat_id 2 Article 3 cat_id 3 I can do each one separtly, but not a the same time, any ideas |
|
#2
|
||||
|
||||
|
RE: double select ?
SELECT blahblahblah WHERE cat_id=1 OR cat_id=2
|
|
#3
|
|||
|
|||
|
RE: double select ?
I don't have trouble writing select statements, what I have trouble with putting it all together..
I have two select statements the first select * from categories while echo "<tr><td> .$row["Cat_name"]. </tr></td>"; $finland = $row["Cat_id"]; select * from articles where cat_id = $finland; while echo "<tr><td>.$row2["Article_name"].</tr></td> can anyone help me put this all together. Iam Oracle Web Dev, not much in PHP and wife needs help. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > double select ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|