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

 2 table lookup help

Print topic Send  topic

Author Message
mhope

Posts: 37
Posted: 01/18/2006, 5:52 PM

Hi all,
I have a problem and hope someone can help.

My project has 2 tables one being a users table and the other being a userphoto table – they both have UserID fields and here is my problem. All the users have can insert photos in the 2nd table (userphoto) what I need to do is have a lookup so when the users table is returned and there is no UserID present in the userphoto table I can change the value to show “noimage.gif”

Thanks
View profile  Send private message
mhope

Posts: 37
Posted: 01/18/2006, 5:56 PM

Also this is CCS 3.0.2.2

Thanks
View profile  Send private message
mhope

Posts: 37
Posted: 01/18/2006, 9:46 PM

Hi all,
I have fixed the issue i was having - I used the followoing code if it might help someone.

  
Dim counts  
Dim WhereSQL  
WhereSQL = "UserID=" & CCToSQL(users.UserID.value, "Text")   
Counts = Clng(CCdlookup("count(*)", "userphoto", WhereSQL , DBEflame) )  
If Not Counts > 0 Then  
users.getImg.Value = "login.gif"   
Else   
users.getImg.Value = "helper.asp?UserID="  
End If  

I also used a couple of lables to pickup the image tags to the HTML

Cheers
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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