can anybody give me query of current version of my sql of

$sql = "SELECT entries.*, FROM entries, catagories
WHERE entries.cat_id =
ORDER BY dateposted DESC
LIMIT 1;";

i will be thankful.

INNER JOIN is what you looking for.

SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name

The Link below will give you a better understanding.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.