Re: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread JJ Harrison
ta.id = tececo_stats.page_id > GROUP BY tececo_stats.page_id > ORDER BY num_hits DESC > > /Joakim > > > -Original Message- > > From: JJ Harrison [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, July 09, 2002 11:07 AM > > To: [EMAIL PROTECTED] > > Subjec

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
Forgot. You have to change $row['tececo_stats.views'] to $row['num_hits'] /J > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 09, 2002 11:15 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Grr SQL sy

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
[EMAIL PROTECTED]] > Sent: Tuesday, July 09, 2002 11:07 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Grr SQL syntax error silghtly OT > > > table structure for tececo stats(Stores information about the > visitors to my > site.visited is either 0 or 1 depending on whether or

Re: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread JJ Harrison
table structure for tececo stats(Stores information about the visitors to my site.visited is either 0 or 1 depending on whether or not the stats cookie has been set): id int(11) unsigned NOT NULL auto_increment, page_id int(11) NOT NULL default '0', visited int(11) NOT NULL default '0', t

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
I assume that 2count should really be count and 2 is just the line-number you added in this post... tececo_stats.views is (probably) the name of a column and cannot be used as an alias. Change it to something else. change count(*) to count(tececo_stats.*) (I think that's what you want) And you pr

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread Brian McGarvie
2count(*)? don't look right > -Original Message- > From: JJ Harrison [mailto:[EMAIL PROTECTED]] > Sent: 09 July 2002 9:10 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Grr SQL syntax error silghtly OT > > > Sorry :} > > I get a SQL syntax error at line two of the query: > > $query = "se