Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Logic for Modification to File Library?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
JJenson Posted - 12 September 2007 : 23:05:56
Ok I hope I can explain what I am trying to do here and I am hoping someone can help me with the logic on how to go about accomplishing this.

First here is the link to the file library which I am making the modifications to: http://www.vmcplugins.com/forum/file_library.asp

Ok now I will try to explain as best I can:

I need to be able to specify when uploading a file if it goes into Free Downloads or Paid Downloads

I want to be able to sort the categories however I see fit from the admin section kind of how the forums and categories are aligned.

I am not sure all the logic that would be needed to do something like this I mainly got my layout how I need it and now am trying to figure out how to attack what I am trying to do. Mainly seperate Free and Paid and be able to order them how I need to.

Thanks

<
6   L A T E S T    R E P L I E S    (Newest First)
JJenson Posted - 17 September 2007 : 22:53:24
Fixed now my only problem is with my sql where clause to only show what I need it to show I have posted it here.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=65601

Thanks<
JJenson Posted - 17 September 2007 : 21:39:40
Hmm strange works on some but not others. WIll have a look at it. I mean some categories are showing right and others are not showing correct.

Thanks<
JJenson Posted - 16 September 2007 : 13:33:11
OK got it this is the code that works:


strSql = "SELECT FC.ID, FC.F_CAT, COUNT(FF.ID) AS COUNTOFID "
strSql = strSql & "FROM " & strTablePrefix & "FILECAT FC "
strSql = strSql & "INNER JOIN " & strTablePrefix & "FILEMANAGER FF "
strSql = strSql & "ON FC.ID = FF.F_CAT "
strSql = strSql & "WHERE FF.ISFREE = 1 "
strSql = strSql & "GROUP BY FC.F_CAT, FC.ID "
<
JJenson Posted - 16 September 2007 : 13:14:11
Ok so with the help of some others I changed up how I am doing this and have the query's running right now I just need to get me SQL statments right.

Here is what I have:

strSql = "SELECT FORUM_FC.ID, FORUM_FC.F_CAT, COUNT(FORUM_FILEMANAGER.ID) AS COUNTOFID "
strSql = strSql & "FROM " & strTablePrefix & "FILECAT FC "
strSql = strSql & "INNER JOIN " & strTablePrefix & "FILEMANAGER "
strSql = strSql & "FORUM_FC.ID = FORUM_FILEMANAGER.F_CAT "
strSql = strSql & "WHERE FORUM_FILEMANAGER.ISFREE = 1 "
strSql = strSql & "GROUP BY FORUM_FC.F_CAT, FORUM_FC.ID"


This is the error I get with that any ideas?

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.20-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 '.ID = FORUM_FILEMANAGER.F_CAT WHERE FORUM_FILEMANAGER.ISFREE = 1 GROUP BY FORUM_' at line 1

/forum/file_library.asp, line 408

ANyone know how I can change this?

Thanks
<
JJenson Posted - 16 September 2007 : 09:54:49
OK so looking at this closer and closer I think I don't need the if statement at all I just need to get all the strsql statements correct.

I tried this the page shows but it is not limiting the free section to just the files marked as free this is the code I have:


strSql = "SELECT F_VERSION "
strSql = strSql & "WHERE ID IN Free"
strSql = "SELECT FC.ID, FC.F_CAT, COUNT(FF.ID) AS CountOfID "
strSql = strSql & "FROM " & strTablePrefix & "FILECAT FC "
strSql = strSql & "LEFT JOIN " & strTablePrefix & "FILEMANAGER FF "
strSql = strSql & "ON FC.ID = FF.F_CAT "
strSql = strSql & "GROUP BY FC.F_CAT, FC.ID"


<
JJenson Posted - 16 September 2007 : 00:10:36
OK I think I am getting through this but I am a little stuck in one spot here.

I have this code to display what is in the database as Forum Version this is the code:


if MyVersion = "0" or MyVersion = "" then
Response.Write "N/A"
else
strSql = "SELECT F_VERSION "
strSql = strSql & "FROM " & strTablePrefix & "FILEVERSION "
strSql = strSql & "WHERE ID IN (" & MyVersion & ")"
Set rsY = my_Conn.Execute (strSql)
rsY.MoveFirst
while not rsY.EOF
Response.Write rsY("F_VERSION") & "<br />"
rsY.MoveNext
wend
rsY.Close
end if


I am trying to put into this statement.

strSql = "SELECT FC.ID, FC.F_CAT, COUNT(FF.ID) AS CountOfID "
strSql = strSql & "FROM " & strTablePrefix & "FILECAT FC "
strSql = strSql & "LEFT JOIN " & strTablePrefix & "FILEMANAGER FF "
strSql = strSql & "ON FC.ID = FF.F_CAT "
strSql = strSql & "GROUP BY FC.F_CAT, FC.ID"


I want to take the forum version which in the database is called Free and put it into the above statement.

I think it needs to look something like this?

if strSql = "SELECT F_VERSION "
strSql = strSql & "WHERE ID IN = Free"
then
strSql = "SELECT FC.ID, FC.F_CAT, COUNT(FF.ID) AS CountOfID "
strSql = strSql & "FROM " & strTablePrefix & "FILECAT FC "
strSql = strSql & "LEFT JOIN " & strTablePrefix & "FILEMANAGER FF "
strSql = strSql & "ON FC.ID = FF.F_CAT "
strSql = strSql & "GROUP BY FC.F_CAT, FC.ID"


How would I put that into the SQL Statement?<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07