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

 Send NULL Instead of Empty String to MySQL

Print topic Send  topic

Author Message
maxhugen

Posts: 272
Posted: 03/28/2008, 8:12 PM

If you edit an existing record, deleting a previous value in a field, I think that CCS sends an empty string, rather than a Null, perhaps like:

UPDATE Company SET Company.City = '';

This results in the table having a mix of Null and empty string values.

1. Is there some way I can find out the SQL expression that CCS sends to MySQL?

2. Is there any method that would ensure that a Null is used, rather than an empty string?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message
wkempees


Posts: 1679
Posted: 03/29/2008, 6:50 AM

1: In Project Explorer, expand CommonFiles, locate db_mysql.php, open (doubleclick) that in Editor.
Find Debug = 0;, set it to 1. Close save and Publish.
From now on SQL will be displayed at the top row of your page.
When done debugging, set it back to 0.

2: Each Textbox has in it's Properties a Default Value, to be used when no other value is entered.
That can be set to NULL.
Overall rule is, the database field has a default setting.

Search Help file for: Default Value Property
HTH

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
maxhugen

Posts: 272
Posted: 03/29/2008, 2:47 PM

Thanks again, Walter!
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.