Scott
On 7/9/06, Scott Laird
<[EMAIL PROTECTED]> wrote:
This is mysql?On 7/9/06, Chris Clark < [EMAIL PROTECTED]> wrote:Been following this, as I gave up on the archives a while ago, just didn't have time to dig into it.I just tried r1096, and now I see the archives again, though it comes across as a linked 1 with 460 articles in it. Clicking the link /articles/find_by_date?month=0&year=1 gives an argument out of range errorOn Jul 9, 2006, at 9:04 AM, Scott Laird wrote:Can you try r1096?
ScottOn 7/9/06, Steve Longdo < [EMAIL PROTECTED]> wrote:Seems to be something with the || concat. I switched to the function:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.14-standard
mysql> select count(*) as count, concat(extract(year from published_at),lpad(extract(month from published_at),2,'0')) as date from contents where type='Article' group by date order by date desc limit 5;
+-------+--------+
| count | date |
+-------+--------+
| 1 | 200607 |
| 8 | 200606 |
| 7 | 200605 |
| 5 | 200604 |
| 14 | 200603 |
+-------+--------+
5 rows in set (0.03 sec)
Is it maybe just an issue on MySQL prior to version 5? Most of the shared hosts haven't upgraded to 5 yet...On 7/9/06, Scott Laird < [EMAIL PROTECTED]> wrote:That's... bizarre.
Can you play with it a bit? Does extract(month from published_at) and extract(year from published_at) work right?
Scott
On 7/8/06, Steve Longdo < [EMAIL PROTECTED]> wrote:1089 resolves the SQL error, but the archives sidebar still renders as 1().
Here is the result of that query:
mysql> select count(*) as count, extract(year from published_at)||'
'> '||lpad(extract(month from published_at),2,'0') as date from contents
-> where type='Article' group by date order by date desc limit 5;+-------+------+
| count | date |
+-------+------+
| 71 | 1 |
+-------+------+
1 row in set (0.01 sec)On 7/8/06, Scott Laird < [EMAIL PROTECTED]> wrote:If that doesn't work, then can you run this query and send me the results?
select count(*) as count, extract(year from published_at)||'
'||lpad(extract(month from published_at),2,'0') as date from contents
where type='Article' group by date order by date desc limit 5;
Scott
On 7/8/06, Scott Laird <[EMAIL PROTECTED]> wrote:
> Can you give 1089 a try?
>
>
> Scott
>
>
> On 7/8/06, Steve Longdo < [EMAIL PROTECTED]> wrote:
> >
>
> Well the fix for the MySQL error is simple enough just add "to_i" to the
> count variable that is passed on line 19 of the archives controller. It
> still doesn't render correctly though:
>
>
> Archives
> Master Archive
> 1 ()
>
>
> On 7/8/06, H. Wade Minter < [EMAIL PROTECTED] > wrote:
> > I
> > On Jul 8, 2006, at 11:10 PM, Steve Longdo wrote:
> >
> > > I did a fresh checkout of r1088 and ran 'rake migrate' to update.
> > > I believe that is a migration from 42 to 46. This ran without
> > > error. When I attempt to view the site I get a message stating:
> > > Controller stack got out of kilter!
> > >
> > > I saw this in the log:
> > > Processing ArchivesController#index (for 127.0.0.1 at 2006-07-08
> > > 22:01:11)
> > > Blog Load ( 0.002360) SELECT * FROM blogs ORDER BY id LIMIT 1
> > > Trigger Load ( 0.000713) SELECT * FROM triggers WHERE (due_at
> > > <= '2006-07-08 22:01:11')
> > > Content Load (0.000000) Mysql::Error: You have an error in your
> > > SQL syntax; check the manual that corresponds to your MySQL server
> > > version for the right syntax to use near ''12'' at line 1: select
> > > count(*) as count, extract(year from published_at)||' '||lpad
> > > (extract(month from published_at),2,'0') as date from contents
> > > where type='Article' and published = 1 and published_at <
> > > '2006-07-08 22:01:11' group by date order by date desc limit '12'
> > >
> > > Anybody seen this before? Is the Archives Sidebar broken?
> >
> > I noticed that as well when I upgraded, but haven't had the time to
> > track it down. But yeah, I saw the exact same thing.
> >
> > --Wade
> >
> > _______________________________________________
> > Typo-list mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/typo-list
> >
>
>
> _______________________________________________
>
> Typo-list mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/typo-list
>
>
>
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________Typo-list mailing list
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________ Typo-list mailing list [email protected] http://rubyforge.org/mailman/listinfo/typo-list
