CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [SOLVED] Problem: Use of undefined constant

Print topic Send  topic

Author Message
tomcatsolutions

Posts: 11
Posted: 01/26/2010, 8:01 AM

I have been using my script without problems and now it keeps saying: Use of undefined constant EN assuming 'EN'

The script only retrieves a record with the following visual SQL:

SELECT * FROM table WHERE locale = // and I visually have selected the locale from the session with the default value EN if one does not exist.

I guess it may be something to do with the server, NOT the script because if I run it on my laptop it give the error, but when I upload to my host the errors do not appear.

Does anyone have any idea what is happening, or how to fix this?

Thanks in advance

Ian
_________________
Hosted web applications and services.
http://SaaSZone.com
View profile  Send private message
datadoit
Posted: 01/26/2010, 10:09 AM

You're seeing it locally because your system is set up to display
errors, while your host is not (as it should be).
tomcatsolutions

Posts: 11
Posted: 01/26/2010, 10:48 AM

Hmm..Thanks, it sounds logical. But these errors never appeared before, I did not change any code and everything seems to work, just the errors show.
_________________
Hosted web applications and services.
http://SaaSZone.com
View profile  Send private message
tomcatsolutions

Posts: 11
Posted: 01/26/2010, 11:08 AM

Ahhh, now I've discovered the problem. Thanks datadoit! Sometimes you just need a little nudge in the right direction because you can't see the wood for the trees :-)

I had the errors all along, my localhost is a new instalation and it's configured to how errors. The previous installation was obviously hidding them, like my host!

The problem was in the visual query I wrote the default value as EN, not 'EN' as it should be.
_________________
Hosted web applications and services.
http://SaaSZone.com
View profile  Send private message
datadoit
Posted: 01/26/2010, 11:36 AM

> The problem was in the visual query I wrote the default value as EN, not 'EN'
> as it should be.
> ---------------------------------------

It's interesting in that the VQB didn't know how to handle your default
value for the variable. If the field it's valuating against is text,
the VQB should know to put in the quotes for you. If it's integer, then
no quotes needed.

May want to toss this off to support to let them know.
tomcatsolutions

Posts: 11
Posted: 03/26/2010, 6:22 AM

I never thought of that as I am a newish user of CCS, just thought it was the way it worked. Your right though, it should be able to do the check in the VBQ.
Anyway, everything works perfectly if I put the quotes in - I wonder if anyone else has the same problem?

Regards

Ian
_________________
Hosted web applications and services.
http://SaaSZone.com
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 03/26/2010, 10:50 AM

tomcatsolutions,
Please add [SOLVED] or [RESOLVED] to the thread title. Thanks.
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.