I just add a new global that takes x newest links and put them to the homepage. Normaly i have news only in ony subcat. But this time i want it like wordpress: An article is in subcat "All" and one or more other subcats like society, politics, sports.
If i select from Links, CatLinks, Category i got a link more than one time; so i should select from Links only.
No problem so far.
But now i want to know all subcats also.
Select * from Links order by Add_Date LIMIT 5
while ...
Is this the right way?
Or should i do one select from Links, CatLinks, Category and work with arrays to save all the catnames and (their path) to have what i want?
(Dont care for the path, please. I do it on my own way with two fields path and path2 for language support.)
The result should look like:
I am a title, i am big and fat.
I am a description with max. 255 chars.
added at 12/12/16 and saved in All, Politics and Sports
A click to All, Politics or Sports calls the category page for that category.
Result:
1. Select all needed links and then select the cats
or
2. select all neded links with all cats and save title, description once and all subcats?
If i select from Links, CatLinks, Category i got a link more than one time; so i should select from Links only.
No problem so far.
But now i want to know all subcats also.
Select * from Links order by Add_Date LIMIT 5
while ...
select from CatLinks, Category where CategorID=IDoutput = title, description and all subcats with link to the right cat
while
take name and Path (Path is my variable for the path/url for every cat)
Is this the right way?
Or should i do one select from Links, CatLinks, Category and work with arrays to save all the catnames and (their path) to have what i want?
(Dont care for the path, please. I do it on my own way with two fields path and path2 for language support.)
The result should look like:
I am a title, i am big and fat.
I am a description with max. 255 chars.
added at 12/12/16 and saved in All, Politics and Sports
A click to All, Politics or Sports calls the category page for that category.
Result:
1. Select all needed links and then select the cats
or
2. select all neded links with all cats and save title, description once and all subcats?