Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Andy #1
Sorry to repost, but couldn't find the answer!
Can anyone see what i'm doing wrong here please?
SELECT category.CategoryID, category.Category, category.Category_Image,
category.Category_Text, products.ProductID, products.CategoryID,
products.Product_Title, products.Product_Description,
products.Product_Image, products.Product_Price, Prices.ID, Prices.UserID,
Prices.ProductID, Prices.Price, retailers.UserID, retailers.Retailer_Name,
retailers.Retailer_Logo, retailers.username, retailers.show_prices
FROM retailers INNER JOIN ((category INNER JOIN products ON
category.CategoryID = products.CategoryID) INNER JOIN Prices ON
products.ProductID = Prices.ProductID) ON retailers.UserID = Prices.UserID
WHERE category.categoryID = MMColParam1 AND retailer.Retailer_Name =
MMColParam2
MMColParam1 2 Request("CategoryID")
MMColParam2 andy Request.Cookies("ckusername")
When i test the RS i get the 'too few parameters. Expected 2
Thanks in advance
Andy
Andy Guest
-
Propabely a FAQ-question, but I can't find the answer...
Who can tell me what's a good conversion tool from BDE (Paradox) to MySQL... It may be Shareware, but my budget is limited, so preferable... -
Very simple question that i can't find an answer for
Hey everyone. I just want to be able to use the # charector in plaintext on a cold fusion page, but of course it thinks that i am trying to do... -
Wont Publish Site - Read Help Cannot find answer!
I used to use Publisher 98 to design my web page. I only know a little about HTML codes. I changed software to Windows XP and Purchased Pulisher... -
Debug Problem with VS.NET - can't find answer
yes, I have...sorry, I was looking for a vs.net group but couldn't find one. didn't know that there was a debugging group. "Alvin Bruney"... -
Re (repost): Is this a bug?
I forgot to actually use ack vs. each below but either way I get the same behaviour... BTW I am using 1.6.8 on FreeBSD 4.8 Aryeh Friedman wrote: -
Geo #2
Re: Sorry to repost, but couldn't find the answer!
Hi Andy you will have to declare your variables before you execute the SQL
statement. Try something like this.
<%MMColParam1 = 2 ' Request("CategoryID")
MMColParam2 = "andy" ' Request.Cookies("ckusername")
sql="SELECT category.CategoryID, category.Category,
category.Category_Image,"_
&"category.Category_Text, products.ProductID, products.CategoryID,"_
&"products.Product_Title, products.Product_Description,"_
&"products.Product_Image, products.Product_Price, Prices.ID,
Prices.UserID,"_
&"Prices.ProductID, Prices.Price, retailers.UserID,
retailers.Retailer_Name,"_
&"retailers.Retailer_Logo, retailers.username, retailers.show_prices"_
&"FROM retailers INNER JOIN ((category INNER JOIN products ON"_
&"category.CategoryID = products.CategoryID) INNER JOIN Prices ON"_
&"products.ProductID = Prices.ProductID) ON retailers.UserID =
Prices.UserID"_
&"WHERE category.categoryID = MMColParam1 AND retailer.Retailer_Name ="&
MMColParam2
response.write(sql)
%>
"Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
news:d35em6$cp$1@forums.macromedia.com...> Can anyone see what i'm doing wrong here please?
>
> SELECT category.CategoryID, category.Category, category.Category_Image,
> category.Category_Text, products.ProductID, products.CategoryID,
> products.Product_Title, products.Product_Description,
> products.Product_Image, products.Product_Price, Prices.ID, Prices.UserID,
> Prices.ProductID, Prices.Price, retailers.UserID, retailers.Retailer_Name,
> retailers.Retailer_Logo, retailers.username, retailers.show_prices
> FROM retailers INNER JOIN ((category INNER JOIN products ON
> category.CategoryID = products.CategoryID) INNER JOIN Prices ON
> products.ProductID = Prices.ProductID) ON retailers.UserID = Prices.UserID
> WHERE category.categoryID = MMColParam1 AND retailer.Retailer_Name =
> MMColParam2
>
> MMColParam1 2 Request("CategoryID")
> MMColParam2 andy Request.Cookies("ckusername")
>
> When i test the RS i get the 'too few parameters. Expected 2
>
>
> Thanks in advance
> Andy
>
>
>
>
>
>
Geo Guest
-
Andy #3
Re: Sorry to repost, but couldn't find the answer!
Hi, thanks for replying. Here is the actual code generated by MM
<%
Dim RSproducts__MMColParam1
RSproducts__MMColParam1 = "0"
If (Request("CategoryID") <> "") Then
RSproducts__MMColParam1 = Request("CategoryID")
End If
%>
<%
Dim RSproducts__MMColParam2
RSproducts__MMColParam2 = "0"
If (Request.Cookies("ckusername") <> "") Then
RSproducts__MMColParam2 = Request.Cookies("ckusername")
End If
%>
<%
Dim RSproducts
Dim RSproducts_numRows
Set RSproducts = Server.CreateObject("ADODB.Recordset")
RSproducts.ActiveConnection = MM_Online_Brochure_STRING
RSproducts.Source = "SELECT category.CategoryID, category.Category,
category.Category_Image, category.Category_Text, products.ProductID,
products.CategoryID, products.Product_Title, products.Product_Description,
products.Product_Image, products.Product_Price FROM category INNER JOIN
products ON category.CategoryID = products.CategoryID WHERE
Products.CategoryID = " + Replace(RSproducts__MMColParam1, "'", "''") + "
AND retailer.Retailer_Name = " + Replace(RSproducts__MMColParam2, "'",
"''") + ""
RSproducts.CursorType = 0
RSproducts.CursorLocation = 2
RSproducts.LockType = 1
RSproducts.Open()
RSproducts_numRows = 0
%>
But i get the 'too few parameters. Expected 1' still?
Scratching my head
Andy
"Geo" <gbarrNoSpam@ibigroup.com> wrote in message
news:d35fea$1i0$1@forums.macromedia.com...> Hi Andy you will have to declare your variables before you execute the SQL
> statement. Try something like this.
>
> <%MMColParam1 = 2 ' Request("CategoryID")
> MMColParam2 = "andy" ' Request.Cookies("ckusername")
> sql="SELECT category.CategoryID, category.Category,
> category.Category_Image,"_
> &"category.Category_Text, products.ProductID, products.CategoryID,"_
> &"products.Product_Title, products.Product_Description,"_
> &"products.Product_Image, products.Product_Price, Prices.ID,
> Prices.UserID,"_
> &"Prices.ProductID, Prices.Price, retailers.UserID,
> retailers.Retailer_Name,"_
> &"retailers.Retailer_Logo, retailers.username, retailers.show_prices"_
> &"FROM retailers INNER JOIN ((category INNER JOIN products ON"_
> &"category.CategoryID = products.CategoryID) INNER JOIN Prices ON"_
> &"products.ProductID = Prices.ProductID) ON retailers.UserID =
> Prices.UserID"_
> &"WHERE category.categoryID = MMColParam1 AND retailer.Retailer_Name ="&
> MMColParam2
>
>
> response.write(sql)
>
> %>
>
>
>
> "Andy" <AndyjhughesNOSPAM@ntlworld.com> wrote in message
> news:d35em6$cp$1@forums.macromedia.com...>>> Can anyone see what i'm doing wrong here please?
>>
>> SELECT category.CategoryID, category.Category, category.Category_Image,
>> category.Category_Text, products.ProductID, products.CategoryID,
>> products.Product_Title, products.Product_Description,
>> products.Product_Image, products.Product_Price, Prices.ID, Prices.UserID,
>> Prices.ProductID, Prices.Price, retailers.UserID,
>> retailers.Retailer_Name,
>> retailers.Retailer_Logo, retailers.username, retailers.show_prices
>> FROM retailers INNER JOIN ((category INNER JOIN products ON
>> category.CategoryID = products.CategoryID) INNER JOIN Prices ON
>> products.ProductID = Prices.ProductID) ON retailers.UserID =
>> Prices.UserID
>> WHERE category.categoryID = MMColParam1 AND retailer.Retailer_Name =
>> MMColParam2
>>
>> MMColParam1 2 Request("CategoryID")
>> MMColParam2 andy Request.Cookies("ckusername")
>>
>> When i test the RS i get the 'too few parameters. Expected 2
>>
>>
>> Thanks in advance
>> Andy
>>
>>
>>
>>
>>
>>
>
>
Andy Guest
-
Julian Roberts #4
Re: Sorry to repost, but couldn't find the answer!
Basic SQL, text fields need to be delimited by a single quote. eg
where myfield='foo'
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest
-
Andy #5
Re: Sorry to repost, but couldn't find the answer!
Hi Jules
Thanks for the reply............(Looking really thick), i don't get it :-(
Andy
"Julian Roberts" <newsg@charon.co.uk> wrote in message
news:d35lh0$bfo$1@forums.macromedia.com...> Basic SQL, text fields need to be delimited by a single quote. eg
>
> where myfield='foo'
>
> --
> Jules
> [url]http://www.charon.co.uk/charoncart[/url]
> Charon Cart 3
> Shopping Cart Extension for Dreamweaver MX/MX 2004
>
>
>
Andy Guest



Reply With Quote

