Mohebius
|
Posted: 10/21/2003, 10:35 PM |
|
Hi folks ! Sorry my english, I'm a spanish speaking
---------------------------------------------------
the problem is that I don't know how include a parameter passed from a URL in a SQL sentence, the thing look like this:
SELECT Name, Logo, Description, Foto
FROM Fab
WHERE Fab.Family_id = ??? <----- ?
I pass the family_id & I put it's reference in a Parameter named "Family"
the cuestion is:
how must I include the parameter in the sentence ?
I try some ways, for example:
SELECT Name, Logo, Description, Foto
FROM Fab
WHERE Fab.Family_id = {Family}
Results = Syntax Error y query expresion Fab.Family_id = Family}
Only with one !!! ------------------^------^
Note: I check the data type (integer),
the reference is passed from the URL line
and it has the correct name.
Help me please !!!
|
|
|
ryan
|
Posted: 10/22/2003, 8:01 AM |
|
i am not spanish speaking either but I may help
u are using the SQL right? First use the table u know the CCS - data source then table.
And then you add parameters (+) let us say you added Family_ID
The types are URL, session, application, code expression (this i do not use)
When you add the Family_ID successfully and when you go to SQL you will see something like
SELECT *
FROM Fab
WHERE Family_id = {Family_ID}
The scenario is when you navigate the page the Family_ID value is that parameter itself like
http://127.0.0.1/mypage.asp?Family_ID=1
If you use a different variable http://127.0.0.1/mypage.asp?Get_ID=1
then obviously it would be
SELECT *
FROM Fab
WHERE Family_id = {Get_ID}
:)
|
|
|
Mohebius
|
Posted: 10/22/2003, 9:05 AM |
|
Thanks ryan.
The thing work great...
Thanks..
|
|
|
|