SQL Statements & Display - نوشته شده در (1605 Views)
Advanced Member
JJenson
مطلب: 2121
2121
Ok I am so close on this and I just don't know how to finish this off.
Lets start if you goto www.vmcplugins.com/forum/file_library.asp

If you see depending on if the file is free or paid based on a value in the database called F_ISFREE is shows in the bottom section or top section.
Now if you click on one of the links it goes into list all the files within that section. The problem is it shows both free and paid files. I need this to only display paid or free depending on the link they click.
Here is a .txt version of my file_library.asp:
www.vmcplugins.com/downloads/file_library.asp.txt

On lines 825 - 830 I have my strsql statement to try and display the list on the order to be paid or free using a querystring.
That is being passed on lines 415 and also 479.
I am stuck at this point on how to display this the way I need to can anyone help me from here? I would be greatly appreciated.
Thanks bigsmile<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Originally posted by JJenson goto www.vmcplugins.com/forum/file_library.asp
Got a test account for us?
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
نوشته شده در
Advanced Member
JJenson
مطلب: 2121
2121
Oh yeah sorry

user: snitz
pass: test<
نوشته شده در
Average Member
cripto9t
مطلب: 881
881
cLng(Request.QueryString("IsFree")) Have you tried that?<
    _-/Cripto9t\-_
نوشته شده در
Advanced Member
JJenson
مطلب: 2121
2121
Ok that did the same as the other. This is how I made the line look.
strSql = strSql & "WHERE F_ISFREE = " & cLng(Request.QueryString("IsFree"))


Also you can view it now without being logged in. SOrry about that didn't even know you had to be logged in to see it. blush<
نوشته شده در
Advanced Member
JJenson
مطلب: 2121
2121
Ok trying to go a different route here I tried passing a variable like so:

Code:

Dim IsFree : IsFree = Request.QueryString("IsFree")

Then putting this in my strsql statement.
Code:

strSql = "SELECT FC.F_CAT, FC.ID, 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 = "WHERE F_ISFREE = " & IsFree & ""
strSql = strSql & " GROUP BY FC.F_CAT, FC.ID "
Set rsX2 = my_Conn.Execute (strSql)

But this did not work either what am I missing cause I am lost bigsmile as usual<
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
نوشته شده در
Advanced Member
JJenson
مطلب: 2121
2121
int

The value is 0=Paid and 1=Free just so know what the values are in the column<
نوشته شده در
Average Member
modifichicci
مطلب: 787
787
نوشته شده در
Advanced Member
JJenson
مطلب: 2121
2121
just tried that in the where claus and it didn't work.<
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Have you tried a response.write on the IsFree & strSql variables to see if they are both set correctly?
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
شما باید یک متن وارد کنید