Author |
Topic |
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 13:47:26
|
Bruno, I don't have MSN. I'm getting the same message on both my forums...
http://www.coincommunity.com/forum/inc_topMessages.asp
http://www.stampcommunity.org/inc_topMessages.asp
I uncommented the sql line and this is what I get...
SELECT TOP 15 a.CAT_ID, a.FORUM_ID, a.TOPIC_ID, a.T_SUBJECT, a.MSG_ID, a.MSG, a.MSG_DATE, a.MEMBER_ID, a.M_NAME FROM ( SELECT t.CAT_ID, t.FORUM_ID, t.TOPIC_ID, t.T_SUBJECT, '' AS MSG_ID, t.T_MESSAGE AS MSG, t.T_DATE AS MSG_DATE, m.MEMBER_ID, m.M_NAME FROM FORUM_MEMBERS m INNER JOIN FORUM_TOPICS t ON m.MEMBER_ID = t.T_AUTHOR UNION ALL SELECT t.CAT_ID, t.FORUM_ID, t.TOPIC_ID, t.T_SUBJECT, r.REPLY_ID AS MSG_ID, r.R_MESSAGE as MSG, r.R_DATE as MSG_DATE, m.MEMBER_ID, m.M_NAME FROM (FORUM_TOPICS t INNER JOIN FORUM_REPLY r ON t.TOPIC_ID = r.TOPIC_ID) INNER JOIN FORUM_MEMBERS m ON r.R_AUTHOR = m.MEMBER_ID ) a INNER JOIN FORUM_FORUM f ON f.FORUM_ID = a.FORUM_ID WHERE f.F_PRIVATEFORUMS = 0 ORDER BY MSG_DATE DESC;
Hopefully that helps.< |
Switch the order of your title tags |
|
|
richfed
Average Member
United States
999 Posts |
Posted - 02 March 2008 : 15:08:26
|
Thanks, Bruno ... got it now. Thank you for your quick assistance on this!< |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 15:19:48
|
bobby131313
using mySQL, MS SQL or MS Access ?
cause using MS Access and MS SQL it's working fine that SQL query on my Database as you can see it here:
Edited: Added mySQL query image using a fresh install of Snitz Forum (so, only 1 message)< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 17:55:20 |
|
|
bobby131313
Senior Member
USA
1163 Posts |
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 15:55:38
|
damm...
let me trying to find a conversion for that code (no mySQL here) ... if any mySQL expert around, fell free to post this code converted. I will them update the version.
SQL Code can be found here
Done...
v.1.3 working with mySQL < |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 16:07:50 |
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 16:02:03
|
I'm almost sure I ran into this with some other mods. I think "Select top" needs to use "topsql" for MySQL. I've been playing with it no luck yet.< |
Switch the order of your title tags |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 16:08:53
|
can you try the new code bobby131313 ?
and tell me if it works?< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 16:24:18
|
Not yet...
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'TopSQL'
/forum/test_topMessages.asp, line 103 < |
Switch the order of your title tags |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 16:36:03
|
you need to include the function
for testing proposes or using outside the Snitz environment you need this:
<!--#include file="inc_func_common.asp"-->
when you add the include of inc_topMessages.asp in your default.asp file, this inc_func_common.asp is already included in the header, so you don't need to add it ... but to use as standalone only... you need it
in the 1st message in this topic there is a test page that works as standalone MOD, the test_topMessages.asp file has this code:
the inc_topmessages2.asp file only differes from the original code on lines 22 and 23 where they are commented like:
'TABLE_TYPE_ROWS = 10 ' Number of rows ( Can't be <= 0 ) >> please read note 'TABLE_TYPE_COLS = 1 ' Number of columns ( Can't be <= 0 ) >> please read note < |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 16:42:49 |
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 16:42:15
|
Unfortunately I was trying that as you posted...
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/forum/test_topMessages.asp, line 106 < |
Switch the order of your title tags |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 16:45:55
|
Are you getting any ROWs???
please run the SQL against you database using PHPAdmin for the mySQL database, just run the query and see what is it returning, the SQL code for mySQL is:
< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 17:42:28 |
|
|
leesh695
Junior Member
101 Posts |
Posted - 02 March 2008 : 17:13:48
|
This is my error
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.22-max-log]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 '1 CAT_ID, FORUM_ID, TOPIC_ID, T_SUBJECT, MSG_ID, MSG, MSG_DATE, MEMBER_ID, M_NAM' at line 1
/oriphan/forum/inc_topMessages.asp, line 99 < |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 17:49:23
|
leesh695
the code does not have any errors ... as I changed SELECT LIMIT 20 a.... TO SELECT a... LIMIT 20
cause I found that mySQL uses the LIMIT at the end of the code not in front of the SELECT keyword
I installed mySQL and run it into a fresh installation of the SNITZ forum ...
no errors what so ever
testing FORUM http://www.ga-paneuropean.com/mysql/
testing MOD under mySQL http://www.ga-paneuropean.com/mysql/test_topMessages.asp
query window: < |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 17:53:31 |
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 18:11:01
|
Don't know. It won't work.
The file you link to doesn't have the word LIMIT in it anywhere by the way.
No big deal, I appreciate you trying. Maybe there's something I've done before conflicting with it.< |
Switch the order of your title tags |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 19:51:16
|
the code does not have the word LIMIT eighter TOP, this is made by the line 103
objRec.Open TopSQL(sqlstr, cStr(TABLE_TYPE_TOP)), My_Conn
you can check the SQL Query uncomment lines 99 and 100
and change them to:
response.Write("<hr/>" & TopSQL(sqlstr, cStr(TABLE_TYPE_TOP)) & "<hr/>")
response.flush()
< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 02 March 2008 19:54:22 |
|
|
Topic |
|
|
|