For the first error, I would like to say that the posts.datenumber and
groups.datenumber column *does* exist. I probably should have made that
clear,
I've added the schema now. https://gist.github.com/3925058
When I use the virtual row, it started working to do what I wanted it to
do. Thank you. It was a query to order groups based on recent activity,
excluding comment replies.
This leads me to my 2nd question.
How can I modify the first query that originally worked, so that inbetween
.order{max(posts__datenumber) and .order_append(:groups__datenumber), that
posts with a pond with more than zero 0, be excluded from the ordering of
the rows, or that the groups with a post above zero, gets lower presedence
in sorting?
On 21 October 2012 02:52, Jeremy Evans <[email protected]> wrote:
> On Saturday, October 20, 2012 3:44:00 PM UTC-7, desbest wrote:
>>
>> I'm having problems with this query, which I've put on Github Gist for
>> syntax highlighting so you can see what's going on better.
>>
>> What I want to do, is join the groups table to the posts table, which
>> I've done. But I only want to retreive the tables that have their pond
>> column, being more than 1.
>>
>> The link is here.
>>
>> https://gist.github.com/**3925058 <https://gist.github.com/3925058>
>>
>
> Your first error is "SQLite3::SQLException: no such column:
> posts.datenumber", which should be obvious, that column doesn't exist in
> that table. You didn't post the schema for the tables involved in the
> query, but if I had to guess, you want groups__datenumber instead of
> posts__datenumber.
>
> Your second error is "comparison of Symbol with Integer failed", which is
> because you are on ruby 1.9 and Sequel doesn't override the Symbol#>
> method. Use a virtual row, switch "exclude(:posts__pond > 0)" to
> "exclude{posts__pond > 0}".
>
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sequel-talk/-/eP8P-qM77X4J.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.