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 -> PHP

 CCDLookup problem

Print topic Send  topic

Author Message
Waspman

Posts: 948
Posted: 11/17/2013, 3:53 AM

Anyone know why the LIKE doesn't work?


CCDLookup("field","table","id=".CCToSQL(CCGetFromGet("id", ""),ccsText)." and yearrange LIKE %".CCToSQL($pyear2,ccsText)."%", $db1);

Ta.
_________________
http://www.waspmedia.co.uk
View profile  Send private message
Lucius

Posts: 220
Posted: 11/17/2013, 9:20 AM

I would guess that CCToSQL adds quotes, so your query WHERE looks like:

Quote :
and yearrange LIKE %'your-var'%

Try adding the %'s inside ToSQL function:

  
CCDLookup("field","table","id=".CCToSQL(CCGetFromGet("id", ""),ccsText)." and yearrange LIKE ".CCToSQL("%".$pyear2."%",ccsText), $db1);  
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.