CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 DLookup no longer working within v4

Print topic Send  topic

Author Message
studio_two

Posts: 27
Posted: 07/29/2008, 8:11 AM

Good Afternoon,

I can't seem to get any new queries to work when I use CCDLookup or DLookup. My existing stuff runs, but can't get anything new to return any values.

I have even tried duplicating a CCDLookup comment on the line below an existing onw (and JUST changing the query to look up a different field within the same table).

Is there something I can reset / regenerate to try and flush this out. I upgraded to CC 4.01.00.06 (from 4.0), but still got the same problem.

I can post some code if needed, but this seems like a "general" problem. I'm running PHP; Apache & MySQL.

TIA,
Stephen
View profile  Send private message
wkempees


Posts: 1679
Posted: 07/29/2008, 12:31 PM

please do post code.
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
studio_two

Posts: 27
Posted: 07/30/2008, 6:42 AM

OK, here goes.

The first line generates output and the second generates nothing. The only difference between the two is that I am retreiving a different field within the database (and assigning it to a different variable). Both fields are Int(11) within MySQL....

$last_qspr_no = CCDLookup("qspr_no", "qspr_register","qspr_index='".$last_record_added."'",$DBQuality_DB);

$drawing_entry_id = CCDLookup("drawing_entry_id", "qspr_register","qspr_index='".$last_record_added."'",$DBQuality_DB);

View profile  Send private message
maxhugen

Posts: 272
Posted: 07/30/2008, 6:53 PM

In lookup 1 you assign the result to $last_qspr_no, but you are using $last_record_added in the second - is that the intention?

_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
studio_two

Posts: 27
Posted: 07/31/2008, 1:27 AM

Quote maxhugen:
In lookup 1 you assign the result to $last_qspr_no, but you are using $last_record_added in the second - is that the intention?


Yeah, that will then get assigned to a field on my web page. Just as a test, I tried assigning the value to $last_qspr_no, but still didn't get anything. I'm puzzled by this one....
View profile  Send private message
wkempees


Posts: 1679
Posted: 07/31/2008, 1:59 AM

Quote :
$last_qspr_no = CCDLookup("qspr_no", "qspr_register","qspr_index='".$last_record_added."'",$DBQuality_DB);

$drawing_entry_id = CCDLookup("drawing_entry_id", "qspr_register","qspr_index='".$last_record_added."'",$DBQuality_DB);
asyou state both fields are int(11)
I assume your qspr_index is an int() as well ??

You're feeding it a string, in your code.
Where does $last_record_added come from, what code is assigning it a value?

try this:
  
$last_qspr_no = CCDLookup('qspr_no', 'qspr_register','qspr_index=' . $DBQuality_DB->ToSQL($last_record_added, ccsIntger) , $DBQuality_DB);  
  
$drawing_entry_id = CCDLookup('drawing_entry_id', 'qspr_register','qspr_index=' .$DBQuality_DB->ToSQL($last_record_added, ccsInteger) ,$DBQuality_DB);  
  


Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
studio_two

Posts: 27
Posted: 10/10/2008, 2:56 AM

Thanks,

It seems that adding any NEW CCDLookup commands does not work at all (even copying "known good" pieces of code within the same form). Anything existing works fine.

I'll get onto support about this.

Thanks again,
Stephen
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.

MS Access to Web

Convert MS Access to Web.
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.