[SOLVED] One questions.......

This is a discussion on "[SOLVED] One questions......." within the Databases section. This forum, and the thread "[SOLVED] One questions....... are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Oct 2nd, 2003, 06:38
Anonymous User
Guest
Posts: n/a
[SOLVED] One questions.......

Already sent you the information on this. But, here it is again.

http://javascript.internet.com/cooki...-redirect.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Mar 18th, 2004, 07:24
New Member
Join Date: Mar 2004
Location: Italy
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
One questions.......

The own this script for snitz forum 3.4.03 that it chart produces flowing container the last 10 posts. Such script has been written for forum with micosoft acces while my forum works with database mysql. Can you point out to me the changes to bring to the script to make to work it with database mysql?

The file name is inc_newsscorrevoli.asp

The code is:
<%
'################################################# ################################
'## News Forum MOD v1.0 for Snitz v3.3 by dan@danknows.com
'## News Forum refreshed MOD v1.1 for Snitz v3.4 Update by alex042@picme.net
'## Most Recent Topics Scroller Mod v1.1 for Snitz v3.4
'################################################# ################################
'## Modificato per la default.asp da ciricado.it
' ******** BEGIN News display ********
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
if instr(strUserAgent, "MSIE") or instr(strUserAgent, "MSIE 6.") or instr(ua, "MSIE 5.") or instr(strUserAgent, "Netscape") or instr(strUserAgent, "Netscape7.")then
nPosts = 10
strwh = "768"
strht = "50"
strspeed = "1"



strSql ="SELECT TOP "& nPosts & " " & strTablePrefix & "TOPICS.CAT_ID, " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_REPLIES, " & strTablePrefix & "TOPICS.T_DATE, " & strMemberTablePrefix & "FORUM.F_SUBJECT, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_MESSAGE, " & strTablePrefix & "TOPICS.T_DATE, " & strTablePrefix & "TOPICS.T_MSGICON, " & strMemberTablePrefix & "TOPICS.T_STATUS, " & strMemberTablePrefix & "MEMBERS.M_SIG"
strSql = strSql & " FROM " & strTablePrefix & "FORUM INNER JOIN (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strTablePrefix & "TOPICS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR) ON (" & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID) AND (" & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID)"
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.F_PRIVATEFORUMS = 0 and " & strTablePrefix & "TOPICS.T_STATUS = 1"
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.TOPIC_ID DESC"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_conn, 3
Response.Write "<table width=""100%"" border=""0"" bordercolor=""" & strTableBorderColor & """ cellspacing=""1"" cellpadding=""0"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
"<tr>" & vbNewLine & _
"<td align=center bgcolor=""" & StrHeadCellColor & """>" & vbNewLine & _
"<font size=""4"" color=""" & StrHeadFontColor & """>Ultime Discussioni</font>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"<tr>" & vbNewLine & _
"<td align=""left"">" & vbNewLine & _
"<table width=""100%"" border=""0"" bordercolor=""" & strTableBorderColor & """ cellspacing=""0"" cellpadding=""0"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
"<tr>" & vbNewLine & _
"<td align=""center"">" & vbNewLine & _
"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
"<tr>" & vbNewLine & _
"<td align=""left"">" & vbNewLine & _
"<marquee id=""marquee"" style=""cursor: hand"" OnMouseOut=""marquee.start()"" OnMouseOver=""marquee.stop()"" scrollamount=""" & strspeed & """ scrolldelay=""0"" behavior=""Scroll"" direction=""up"" width=""" & strwh & """ height=""" & strht & """>" & vbNewLine

if not (rs.EOF or rs.BOF) then
rs.movefirst
do while (not rs.EOF)
if instr(strUserAgent, "MSIE") or instr(strUserAgent, "MSIE 6.") or instr(ua, "MSIE 5.") then
Response.Write "</font><left><font size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """ face=""" & strDefaultFontFace & """>**" & rs.Fields("T_SUBJECT") & "</font><font size=""" & strFooterFontSize & """>**Scritto da " & rs.Fields("M_Name") & "</font><font size=""" & strFooterFontSize & """>*Il*" & ChkDate(rs.Fields("T_Date")," alle ",true) & "</font><font size=""" & strFooterFontSize & """ face=""" & strForumFontFace & """ color=""" & strForumFontColor & """>*[ risposte*(" & rs("T_REPLIES") & ") ]* [ " & rs("F_SUBJECT") & " ]</font><font color=""" & strForumCellColor & """></left>

" & rs.movenext & "" & vbNewLine
else
Response.Write "</font><left><font size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """ face=""" & strDefaultFontFace & """>**" & rs.Fields("T_SUBJECT") & "</font><font size=""" & strFooterFontSize & """>**Scritto da " & rs.Fields("M_Name") & "</font><font size=""" & strFooterFontSize & """>*Il*" & ChkDate(rs.Fields("T_Date")," alle ",true) & "</font><font size=""" & strFooterFontSize & """ face=""" & strForumFontFace & """ color=""" & strForumFontColor & """>*[ risposte*(" & rs("T_REPLIES") & ") ]* [ " & rs("F_SUBJECT") & " ]</font><font color=""" & strForumCellColor & """></left>

" & rs.movenext & "" & vbNewLine
end if
loop
end if
rs.Close
Set rs = Nothing
Response.Write "</marquee>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</td>" & vbNewLine & _
"</tr>" & vbNewLine & _
"</table>" & vbNewLine
Function RemoveSignature(strExpression, strRemove)
if strRemove <> " " then
RemoveSignature = Replace(strExpression, strRemove, "")
else
RemoveSignature = strExpression
end if
End Function
end if
%>

This code work very well whit Access but don't work in mysql database.
Sorry fom my terrible English.
Thanks for help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Mar 18th, 2004, 18:55
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
SQL is a pretty universal language. There's not much that changes between using it with Access, MSSQL, or mySQL.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Mar 22nd, 2004, 07:04
New Member
Join Date: Mar 2004
Location: Italy
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
This script in ASP recalls some data of the database with access it works and with mysql it produces error to the line rs.open strSql, my_conn, 3 have modified the parameter strSql = SELECT TOP with strSql = " SELECT " but without result.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Mar 22nd, 2004, 12:20
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
whats the error?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Mar 22nd, 2004, 16:10
Junior Member
Join Date: Sep 2003
Location: Dubai, United Arab Emirates
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by gallocedrone

This script in ASP recalls some data of the database with access it works and with mysql it produces error to the line rs.open strSql, my_conn, 3 have modified the parameter strSql = SELECT TOP with strSql = " SELECT " but without result.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

IIRC, you can't use SELECT TOP in mySQL. You need to use LIMIT at the end of the query.

There are a few differences in the syntax between MS SQL, Access and mySQL. Not many, but enough to make things annoying.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Mar 25th, 2004, 13:11
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
gallocedrone, can see you have edited your post, but cant tell what has changed. Please post another message if you want to get help here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
questions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
three questions alexgeek Graphics and 3D 2 Sep 13th, 2007 06:39
1 questions Voodoochilli Webforumz Cafe 11 Jul 26th, 2007 14:17
Questions!!! craig Webforumz Suggestions and Feedback 27 Dec 8th, 2005 10:59
2 questions... benbacardi Classic ASP 5 May 6th, 2005 21:25


All times are GMT. The time now is 12:15.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42