CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 ::HELP:: For Coverting CC code in to CCS code

Print topic Send  topic

Author Message
girish_327


Posts: 108
Posted: 05/29/2004, 9:20 AM

Please help me out to convert CC code into CCS code. I want create Rating system for my ebook Project and for that I have to create a Rating System for eBooks
My Tabels are as follows
ebook
ebook_id, rating, rating_count etc.
rating
ebook_id, user_id, rate, ip
This is a befoore Update Code from Go2Code Example
'->Before Update Event Start
userID=Session("UserID")
if userID="" then userID=0

set rsTemp=cn.execute("SELECT article_ratings.* FROM article_ratings WHERE article_ratings.art_id="&pPKart_id&" AND ((article_ratings.user_id=" & UserID & " and article_ratings.user_id<>0) or article_ratings.ip='" & Request.ServerVariables("REMOTE_ADDR")&"')")
if rsTemp.eof then
sSQL="insert into article_ratings (art_id,user_id,art_rate,ip) values("&pPKart_id&","&UserID&","&fldart_rating&",'"&Request.ServerVariables("REMOTE_ADDR")&"')"
cn.execute sSQl
sSQL="update articles set art_rating=art_rating+" & fldart_rating & ", art_rating_count=art_rating_count+1 where art_id=" & pPKart_id
else
sRateErr= "Sorry, but you can't rate the same article twice"

end if
'<-Before Update Event End
__________________________________________________

Before Show Update

'->Before Show Event Start
if fldart_ratingview=0 then
fldart_ratingview="Not yet rated"
fldart_rating_count_view=""
else
fldart_ratingview="<img src=images/" & round(fldart_ratingview/fldart_rating_count) & "stars.gif>"
end if
__________________________________________________

Please Help me to covert Code Charge code in 2 Charge code into Code Charge Studio Compatible
'<-Before Show Event End
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.