user defined troubles

16 years 11 months ago #755 by marcps
I am getting results on who's online examples etc - but cannot get my user defined query to get results.

my query is

select id,action from actionlog where type = 'county' order by `id` desc limit 0,5

this works in sql direct...

This should pull the last 5 counties searched for in my find-a-pro directory.

www.balloonconsultant.co.uk is the web adress.

Marc P Summers

Please Log in or Create an account to join the conversation.

16 years 11 months ago #760 by Saka
As it says in documentation, don't use LIMIT command, it is added automatically.
So try just:
SELECT id, action FROM actionlog WHERE type='county' ORDER BY id DESC

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

16 years 11 months ago #777 by marcps
Thank you for pointing out my silly mistake.  I hope by making a fool of myself will help others :)

Marc

Please Log in or Create an account to join the conversation.

16 years 11 months ago #778 by Saka
No problem, that's what's forum is for.
I did my best to explain everything in PDF documentation but if you are not sure about something just ask.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch