Rome hotels - Find jobs - Italian Property - Debt Consolidation - Sport Betting Systems

PDA

View Full Version : SQL statement for search utility


t7584
Mar 8th 2006, 9:44 am
I want to create a search utility and it's necessary to write SQL statement.

Is this correct? - sSQL="SELECT * FROM r1 ORDER BY ID DESC WHERE r1.message LIKE '%" & strInputSearch & "%';"
Or like this? - sSQL="SELECT * FROM r1 WHERE r1.message LIKE '%" & strInputSearch & "%' ORDER BY ID DESC;"

vectorgraphx
Mar 8th 2006, 9:55 am
put your order by clause at the end, as in your second example.