Author |
Topic  |
|
acoustika
Junior Member
 
Denmark
311 Posts |
Posted - 29 November 2003 : 10:45:52
|
I get this error in the search log after I have upgraded from Access to MySql, anyone who can help with this.
Error: Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.12-nt]Invalid use of group function
/forum/searchlog.asp, line 771
The code lines: I believ it's the part in red where it's wrong
Sub DisplayTopSearchers() strsql = "SELECT SLS_MEMBER, Count(SLS_MEMBER) AS MSCount FROM " & strTablePrefix & "SEARCHLOG_SEARCHES GROUP BY SLS_MEMBER ORDER BY Count(SLS_MEMBER) DESC" Set rsq = my_Conn.Execute(TopSQL(strsql,CInt(strSLPageSize))) Response.Write " <br /><table width=""100%"" align=""center"" border=0 cellspacing=1 cellpadding=3 bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td bgcolor=""" & strHeadCellColor & """ colspan=""3"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>" & vbNewLine & _ " <a href=""#top"" tabindex=""-1"">" & getCurrentIcon(strIconGoUp,"Go To Top Of Page","align=""right""") & "</a>" & vbNewLine & _ " <b><a name=""searchers""></a>Top Searchers</b></font>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine If rsq.Eof or rsq.BOF Then |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
acoustika
Junior Member
 
Denmark
311 Posts |
Posted - 29 November 2003 : 13:14:49
|
ok thanks alot :-) |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
 |
|
acoustika
Junior Member
 
Denmark
311 Posts |
Posted - 29 November 2003 : 13:18:22
|
I have a this error in my DB, but one og the moderators/DB helpers said that it would not affect SNITZ, but this is a mod so maybe it's affecting that, I dont know. This is the error
The additional Features for working with linked Tables have been deactivated |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 29 November 2003 : 15:40:18
|
I dunno. From reading up on GROUP BY it doesn't seem like you should use GROUP BY and ORDER BY togther. You need to use one of the other.
Try removing the ORDER BY Count(SLS_MEMBER) section from the sql query and try again.
If that doesn't work, try removing the GROUP BY SLS_MEMBER section and leave the ORDER BY Count(SLS_MEMBER) section in. |
Support Snitz Forums
|
Edited by - Davio on 30 November 2003 22:26:46 |
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 29 November 2003 : 15:45:34
|
What version of MySQL did you use? He is using v4. |
Support Snitz Forums
|
 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
acoustika
Junior Member
 
Denmark
311 Posts |
Posted - 30 November 2003 : 00:27:18
|
Thanks alot Davio I removed the ORDER BY COUNT in two places in the file and now it's working as a dream, Thanks alot I Would be totally lost without snitz :-) and wauw Im Learning alot, but that's also something the GPL was meant for I think, so Thumbs up for that |
May The Code Be With You www.UniqueDk.dk *** The Open Forums of Denmark *** |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 30 November 2003 : 22:29:31
|
Glad I could help! 
acoustika, I didn't know anything about mysql, until I came here. I didn't even know what a database was either. All the knowledge I gained about MySQL was from experience here and doing a lot of reading and hands on experience with the mysql server on my computer.
My knowledge increased when we needed someone to bug test the forums on a mysql server. So I'm no expert. I just did a lot of reading.  |
Support Snitz Forums
|
 |
|
|
Topic  |
|