im making a site where there is several sport blogs, and in each will be a module with last results, but those results will be all in the same DB, and the chronoconnectivity is perfect for that, i have the freedom to filter the results
but my problem is that i want in the blog about rugby for exemple, the "last results" module showing the rugby last 10 results
im new with this "query sql thing" and i got stuck in this
WHERE sport = 'rugby' AND cf_id>=(select max(cf_id)-10 from jos_chronoforms_resultados) AND cf_id IS NOT NULL ORDER BY recordtime DESCthat is almost working but i cant go any further, the problem is with this code i filter the last 10 results but the 10 results of all sports, and can show from 0 to 10 of rugby results, dependind on the updates...
is there another way to show only the last 10 results, maybe changing the "select max(cf_id)" or using css or php to limit the number?
thanks and sorry for the bad english 😀
I can't understand why do you need the max if you are displaying the last 10 results and you are ordering by datetime, try this :
WHERE sport = 'rugby' ORDER BY recordtime DESC LIMIT BY 0,10Regards,
Max
first i get an error whith the BY, i searched about th limit and found that isnt the by
so the code become
WHERE sport = 'rugby' ORDER BY recordtime DESC LIMIT 0,10but i dont know why, it doesnt show any results, i tried other combinations like:
0,3
1,10
1,3
3
10
and didnt get any result...
WHERE sport = 'rugby'
help if i put the site online?
thanks
Max
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=11019#p17041
Let me know!
Max
i put the page in the server to show that
the page without limit
http://www.atleticafauusp.com.br/joomla3/index.php?option=com_chronoconnectivity&connectionname=Ultimos_Resultados_Gerais
the page with LIMIT 0,3
http://www.atleticafauusp.com.br/joomla3/index.php?option=com_chronoconnectivity&connectionname=Ultimos_Resultados_Gerais2
the page is in progress and has a lot of bugs yet
Warning: Invalid argument supplied for foreach() in /home/a16574/public_html/joomla3/components/com_chronoconnectivity/chronoconnectivity.html.php on line 172
the WERE codes are
WHERE radio9='Rugby' ORDER BY recordtime DESC and
WHERE radio9='Rugby' ORDER BY recordtime DESC LIMIT 0,3
try my patches here and set the list limit to 10 ?
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=11019#p17041
Let me know!
Max
Hi, after you apply my patches above, open the admin general tab and at the last field write 10, then only write this at the WHERE SQL box :
WHERE sport = 'rugby'then test it!
let me know!
Regards
Max
the message error is no more but the limit doesnt work
http://www.atleticafauusp.com.br/joomla3/index.php?option=com_chronoconnectivity&connectionname=Ultimos_Resultados_Gerais
Error: Tips is not defined
Source File: http://www.atleticafauusp.com.br/joomla3/index.php?option=com_chronoconnectivity&connectionname=Ultimos_Resultados_Gerais
Line: 496
Cheers
Max
