close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sql null

Thread began 7/14/2009 8:34 am by shaun.andrews | Last modified 11/16/2009 10:18 am by Ray Borduin | 1431 views | 5 replies |

shaun.andrews

Sql null

I have a dataassist update details page linked to a MySql database. The database has all of the columns set as default NULL. But when a user updates their details and still leaves one of the NULL fields blank it it changes it from NULL to NOT NULL, but just with no information.

Is there a way to set a field as NULL if there is no data entered in the update form?? I'm assuming it's all hand coding, but maybe there is an easy string I can type in the update field?

The only reason I'm using it is one of my SQL queries is based on whether a field is NULL.

Sign in to reply to this post

Ray BorduinWebAssist

I think you can adjust the code on the update page to do what you want. Maybe post your update code and I can suggest what you might change.

Sign in to reply to this post

Lee Firth

I have the same issue. I would like an empty form field to be entered as null into the database not an empty string. The reason for this is that I have code elsewhere checking for null values not empty strings.

Sign in to reply to this post

Ray BorduinWebAssist

You would have to change this manually in the code.

The column type array is built with three sections... the third part is the value to insert when blank.... it will look something like:

$WA_columnTypesStr = "',none,''|',none,''|',none,''|none,none,NULL|...

the column types are separated by | and there will be one for each column referenced above like:

$WA_fieldNamesStr = "Column1|Column2|Column3|Column4|...

If I wanted Column2 to insert null when blank I would update it to:


$WA_columnTypesStr = "',none,''|',none,NULL|',none,''|none,none,NULL|...

Sign in to reply to this post

Lee Firth

I don't like changing code manually as this is the reason you buy extensions in the first place (so you don't have to code). I would think that I wouldn't be on my own wanting the ability to enter a null value in the database if no data was entered in the form. Perhaps this option could be considered in future versions of the extension.

Thanks for your assistance Ray.

Sign in to reply to this post

Ray BorduinWebAssist

We appreciate your suggestions. We try to maintain a balance between easy to use interfaces and complex options. We try to accomodate any often-encountered suggestions but are careful not to over-complicate the interface by exposing every possible option. We will certainly keep your suggestion in mind. I have logged it as a feature request in our internal database.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...