Hi,
Im currently learning PHP with a little help
But this is probably my rubbish database layout, but i am needing a query that gets article id's out of a table, which it is happening, but i need to order this by date which is located in another table.
Query i have at the moment
$result = @mysql_query("SELECT idcat, idinfo FROM news_link WHERE idcat='$sectionid'");
Database Structure:
-----
news_link:
id (primary) | idinfo (foreign) | idcat
-----
news_info:
id (primary) | title | news | date | author | active
-----
id in the news_info table is the same as idinfo in the news_link table
Any more info requred please reply,
thanks in advance
daniel
Im currently learning PHP with a little help

But this is probably my rubbish database layout, but i am needing a query that gets article id's out of a table, which it is happening, but i need to order this by date which is located in another table.
Query i have at the moment
$result = @mysql_query("SELECT idcat, idinfo FROM news_link WHERE idcat='$sectionid'");
Database Structure:
-----
news_link:
id (primary) | idinfo (foreign) | idcat
-----
news_info:
id (primary) | title | news | date | author | active
-----
id in the news_info table is the same as idinfo in the news_link table
Any more info requred please reply,
thanks in advance
daniel
Last edited: