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

WA_IGNORE not appearing to work

Thread began 3/27/2017 8:00 am by Steve_UK | Last modified 3/28/2017 12:03 am by Steve_UK | 49 views | 1 replies

Steve_UK

WA_IGNORE not appearing to work

Hello Ray

I have been on with this issue for a day or more and I cannot get this to work - whatever I do I cannot get the behaviour to ignore the field update.
Essentially I have a form which accepts a number, which in turn adds days to a field and updates the record.
The resulting date seems to be OK, and if the form field ('add_days') is filled in, all works perfectly.
If the form field is left blank, however, the MySQL field always results in the famous '1970-01-01'.

I have tried many ways; here is my latest attempt;

<?php
if (isset($_POST['add_days'])) {
$newdate = strtotime(date("Y-m-d", strtotime($rsLoads->getColumnVal("fabdate")))." + ".$_POST['add_days']. "days");
$newdate = date('Y-m-d', $newdate);
}
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$UpdateQuery = new WA_MySQLi_Query($connLoadTracker);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "lt_loads";
$UpdateQuery->bindColumn("fabdate", "t", "".$newdate ."", "WA_IGNORE");
$UpdateQuery->addFilter("UID", "=", "i", "51");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>

Do you please have any idea why this just will not work?

Many thanks

Steve

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