CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Needing CCDlookup Help

Print topic Send  topic

Author Message
boblagatta
Posted: 03/13/2005, 3:16 PM

I am using CCDlookup and contiue to get errors. Sometimes it works and sometimes it doesn't.

Here is the latest:

//DLookup @41-08DAA61B
global $DBezekiel;
global $ep_actual_answers;
$result = CCDLookUp('name', 'ep_poll', 'poll_id ='.$ep_actual_answers->poll_id->GetValue(), $DBezekiel);
$ep_actual_answers->PollName->SetValue($result);
//End DLookup

The error is:

Database error: Invalid SQL: SELECT name FROM ep_poll WHERE poll_id =
MySQL Error: 1064 (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1)
Session halted.

This same statement worked in another instance.

Any thoughts?

Bob

mrachow


Posts: 509
Posted: 03/13/2005, 11:36 PM

The reason should be that
$ep_actual_answers->poll_id->GetValue()
returns no value. (Is it a label?)
_________________
Best regards,
Michael
View profile  Send private message
wronco


Posts: 15
Posted: 03/14/2005, 4:17 PM

Just in case the above solution doesn't solve it ... The argument might not be in the right format. Use the ToSQL method to make sure it is.
Try changing:
  
 $result = CCDLookUp('name', 'ep_poll', 'poll_id =' .   
           $ep_actual_answers->poll_id->GetValue(),   
           $DBezekiel);
to
  
 $result = CCDLookUp('name', 'ep_poll', 'poll_id =' .   
           $DBezekiel->ToSQL($ep_actual_answers->poll_id->GetValue(),ccsInteger),  
           $DBezekiel);  

Will
_________________
http://www.willronco.com
View profile  Send private message
boblagatta
Posted: 03/15/2005, 3:24 AM

That got it. Thanks for the help.

The information was not being returned in the correct format.

Bob

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.