I have a tree of objects, like so:
Site > section > article
Now within the article i got a dir wich contain page objects, these are created when someone makes a comment on the article.
Now, when someone comments on am article i touch the article so it updates the mtime, i need this to properly show the last article with that comment, because i made my query to order the articles on mtime. But here is the deal, every time someone hits the article its saves a custom data field on it to show how many times it's viewed and to do a query on 'most viewed', but this query is also ordering on mtime and has to be because otherwise the results are not correct. Now these 2 functionalities are conflicting because of the mtime. I found a php line tot touch the object en write you own mtime date on it, tried this in ariadne like; touch() but this gives me a 500 internal server error, so i tried the touch.phtml template, wich works to update the mtime but can't set the mtime, there is no way tot fix this?
Kind regards,
Kevin
--
Je hebt dit bericht ontvangen, omdat je je hebt aangemeld bij een onderwerp in de groep "Ariadne" van Google Discussiegroepen.
Als je je wilt afmelden bij dit onderwerp, ga je naar https://groups.google.com/d/topic/ariadne-cms/lNPJHBwGEMM/unsubscribe.
Als je je wilt afmelden bij deze groep en alle onderwerpen van de groep, stuur je een e-mail naar ariadne-cms+unsubscribe@googlegroups.com.
Bezoek voor meer opties https://groups.google.com/d/optout.
I have a tree of objects, like so:
Site > section > articleNow within the article i got a dir wich contain page objects, these are created when someone makes a comment on the article.
Now, when someone comments on am article i touch the article so it updates the mtime, i need this to properly show the last article with that comment, because i made my query to order the articles on mtime. But here is the deal, every time someone hits the article its saves a custom data field on it to show how many times it's viewed and to do a query on 'most viewed', but this query is also ordering on mtime and has to be because otherwise the results are not correct. Now these 2 functionalities are conflicting because of the mtime. I found a php line tot touch the object en write you own mtime date on it, tried this in ariadne like; touch() but this gives me a 500 internal server error, so i tried the touch.phtml template, wich works to update the mtime but can't set the mtime, there is no way tot fix this?
I want to order them by number like in mysql. but i can't quite figure it out how this works in ariadne.Here is what i do $query = "object.type='ppage' and object.priority>-1 and object.parent='".$path."' order by my.customvalue desc;my.customvalue = INT number. but ariadne gives me wrong results.for example:100
10000
10060
10077
10077
101
how can I do something like SQL - ORDER BY CAST(my.customvalue as INT?