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