close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


empty field was null in mysql db now 0 in MariaDB with mysql_i

Thread began 1/29/2020 7:23 am by Sweens | Last modified 1/30/2020 7:20 pm by Ray Borduin | 123 views | 2 replies |


empty field was null in mysql db now 0 in MariaDB with mysql_i


I have a form which hades certain fields, depending on set values. For example:

<?php if ($_GET['pt'] <>"5" OR $_GET['under']=="mp"){ ?>
<input name="UnderPage" type="hidden" id="UnderPage" value="" />
<?php } ?>

When on a mysql database, using mysql server behaviours, the above code returned a NULL value - bit now we've changed to MariaDB and mysql_i, a 0 is inserted instead of NULL.

The appropriate line from the update behaviour is

$InsertQuery->bindColumn("Under_PgID", "i", "".((isset($_POST["UnderPage"]))?$_POST["UnderPage"]:"") ."", "WA_NULL");

which should set a NULL value - but presumably because the value is now 0, it is ignored.

Is there a way round this, so I don't have to update all the non-admin pages that look for NULL values in this field.

Many thanks

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it should do a Null value... can you provide FTP access and a url that I can use to test with? I'll look into it and see what might be causing this problem.

Sign in to reply to this post
Did this help? Tips are appreciated...


Hi Ray

Thanks - it turns out that its only 2 pages that are affected, so I've just altered the query on those pages to accept 0 or NULL values.



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





Ease of use


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