I have two tables,
Finsubmission
userid
subno
date
financialsummaries
subno
cashflow
networth
The user submits once a month, each month given a different submission number which is also used on many other tables.
I want to select the summary data for the last submission
I've tried this SQL
SELECT top 1 financialsummaries.networth, financialsummaries.cashflow FROM financialsummaries INNER JOIN Finsubmission ON financialsummaries.subno=Finsubmission.subno WHERE userid='$userid' ORDER BY subno DESC
It states a syntax error around '1 financialsummaires.networth, financialsummaries.cashflow'