i searcher over the forum and found a topichttp://www.chronoengine.com/forums.html?cont=posts&f=12&t=11019 almost with the same problem but in different way
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
that 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 😀
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 DESC
that 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 😀
Hi tvidotto,
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 :
Regards,
Max
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,10
Regards,
Max
thanks for the reply, i think your way is a lot better than mine, but couldnt get it working
first i get an error whith the BY, i searched about th limit and found that isnt the by
so the code become
but 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...
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,10
but 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...
Hi, how many records you get with this only :
WHERE sport = 'rugby'
for the test only five, but i can make more
help if i put the site online?
thanks
help if i put the site online?
thanks
good, now try the LIMIT 0,10 , see if you get the same result?
Max
Max
without the LIMIT it works fine, but if i put the LIMIT 0,10 i get none result... i tried other numbers and got nothing too
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
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=12&t=11019#p17041
Let me know!
Max
its the same, with the limit it dont show anything and no error message
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
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
over internet appeared a error messagem that in my local didnt appeared
the WERE codes are
and
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
i aplyed the patches, changed the where to only list the rugby and tested the last field "limit" with various numbers,
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
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
got this error in the ff web developer plugin, but its because im using mootools 1.2 in my site and has a conflict, i think its not a problema to the limit
Error: Tips is not defined
Source File: http://www.atleticafauusp.com.br/joomla3/index.php?option=com_chronoconnectivity&connectionname=Ultimos_Resultados_Gerais
Line: 496
Hi, I tested this, attached one which should work!
Cheers
Max
Cheers
Max
This topic is locked and no more replies can be posted.