Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Scripting > ASP   »   I am very needing yours about asp

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Aug 23, 2006, 11:34 PM
trungsonqlkd
New Member
trungsonqlkd is offline
 
Join Date: Aug 2006
Posts: 2
trungsonqlkd See this member's comment history on his/her Profile page.
I am very needing yours about asp

Hi,
I am VIetnammes i am studying informatic technonogy. I am studing shopping cart, I downed this demo ones is acart2_0 , but i have problem in error.
In eacht pages that have SQL inner join that it don't run
this code example
<%@ LANGUAGE = "VBScript" %>
<!-- #include file="db.asp" -->
<!-- #include file="config.asp" -->
<!-- #include file="functions.asp" -->
<!-- #include file="wishlist.asp" -->

<%
productid=valid_sql(request.querystring("productid "))

if productid=null or productid="" or not(isnumeric(productid)) then
response.redirect("error.asp?msg=" & Server.URLEncode("We have no record of the product you are looking for."))
end if

'get the relevant products details
set rsprod=db.execute("SELECT * FROM products INNER JOIN categories ON products.catcode = categories.catcode WHERE products.productid = " & productid)

if rsprod.eof then
response.redirect("error.asp?msg=" & Server.URLEncode("We have no record of the product you are looking for."))
end if


if request.querystring("wish")="add" then
WISHLIST_add(productid)
end if

'get names and codes of all products in that category
set rscatlist=db.execute("select name,productid from products where catcode=" & rsprod("catcode") & " order by name")
%>

<html>

<head>
<title>
<%= storename %>
</title>

<body bgcolor="<%= bgcolor %>" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="<%= text %>" alink="<%= COLlight %>" link="<%= COLlight %>" vlink="<%= vlink %>">
<font face="arial">
<%
header

categorymenu
%>


<table>
<td valign=top align=right>
<font face="helvetica" size="3" color="<%= COLdark %>"><B><%= rsprod("catname") %></B></font>
<br>
<%

'Display list of other products in category
if not rscatlist.eof then
rscatlist.movefirst
while not rscatlist.eof
%>
<font size="1" face="helvetica" color="<%= COLlight %>">
<a href="product.asp?productid=<%= rscatlist("productid")%>"><%=rscatlist("name")%></a>
<br>
<%
rscatlist.movenext
wend
end if
%>
</td>

<td>
<% = rsprod("image") %>
</td>

<td width=180 align="left">
<font size="3" face="helvetica" color="<%= text %>">
<b><%= rsprod("name") %></b>
<br>
<table width=180 border=0>
<tr>
<td align="left">
<font size="2" face="helvetica" color="<%= COLdark %>">
<b>Price:</b>
</td>
<td align="right">
<font size="2" face="helvetica" color="<%= text %>">
<% if rsprod("saleprice")="" or rsprod("saleprice")=0 then %>
<% =cursymbol & formatnumber(rsprod("price")) %>
<% else %>
<strike>
<% =cursymbol & formatnumber(rsprod("price")) %>
</strike>
</tr>
<tr>
</td>
<td><font size="2" face="helvetica" color="<%= COLsale %>">
Sale Price:
</td>
<td align="right">
<font size="2" face="helvetica" color="<%= COLsale %>">
<b><% =cursymbol & formatnumber(rsprod("saleprice")) %></b>
<font size="2" face="helvetica" color="<%= text %>">
<% end if %>

</td>
</tr>
</table>
<br>


<font size="1">
<%= rsprod("description") %>
<br><br>
<center>
<a href="addprod.asp?productid=<%= rsprod("productid")%>"><img src="http://www.askmehelpdesk.com/images/purchase.gif" border=0></a>
<% if not(WISHLIST_element(rsprod("productid"))) then %>
<br>
<a href="product.asp?productid=<%= rsprod("productid")%>&wish=add"><img src="http://www.askmehelpdesk.com/images/addwish.gif" border=0></a>
<% end if %>
</td>




</table>

<% footer %> </font>

</body>
</html>

<%
db.close
set db=nothing
%>
----------------------
while run it have error in row :

set rscatlist=db.execute("select name,productid from products where catcode=" & rsprod("catcode") & " order by name")

-------------------------
i think it don't run in : &rsprod("cacode") because SQL inner join don' runt
i think this Stament is fasle...

i thank who can help me?

Reply With Quote
 
     

Answers
 
 
Old Aug 23, 2006, 11:46 PM   #2  
trungsonqlkd
New Member
trungsonqlkd is offline
 
Join Date: Aug 2006
Posts: 2
trungsonqlkd See this member's comment history on his/her Profile page.
error in INNER JOIN ..

http://www.alanward.net/acart/acart20.asp

i downloald this shooping cart but it don't run.
i want help
i code error in SQL that have inner jion

you try down and find error help me
thank you.
  Reply With Quote
 
     
 
 
Old Aug 24, 2006, 04:50 AM   #3  
ScottGem
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 22,612
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
What database are you running in the back end? If you are going against an Access (Jet) database then you may need to close your SQL statements with a ; like so:

SELECT * FROM products INNER JOIN categories ON products.catcode = categories.catcode WHERE products.productid = " & productid & ";"

Also, have you tried testing your queries directly to make sure the SQL works and the right records arer returned?
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
Needing help // advice. davidmcintosh03 Relationships 9 Aug 22, 2006 08:17 AM
Needing Some Magic (in the Cream etc.) glowinggirl Skin Lightening 3 May 22, 2006 05:15 AM
needing a little hope/help kanolan Relationships 13 Mar 4, 2006 12:23 PM
Needing an answer mustangstaats Psychics 4 Jun 3, 2005 07:26 PM
Needing Direction MSKnowitall5 Psychics 1 Jun 14, 2003 08:44 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 09:43 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.