close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Delete Where UserID=($_GET['UserID']) AND Rating=ISNULL

Thread began 6/01/2021 6:21 pm by Chance | Last modified 6/03/2021 10:10 am by Ray Borduin | 484 views | 7 replies |

Chance

Delete Where UserID=($_GET['UserID']) AND Rating=ISNULL

How do you add a 2nd filter containing a null statement?

Here is the full code.

<?php
if ((((isset($_GET["btn1_x"]))?$_GET["btn1_x"]:"") != "")) {
$DeleteQuery = new WA_MySQLi_Query($xxx);
$DeleteQuery->Action = "delete";
$DeleteQuery->Table = "tblRatings";
$DeleteQuery->addFilter("UserID", "=", "i", "".($_GET['UserID']) ."");
THIS LINE -------> $DeleteQuery->addFilter("Rating", "=", "s", "''");
$DeleteQuery->execute();
$DeleteGoTo = "";
if (function_exists("rel2abs")) $DeleteGoTo = $DeleteGoTo?rel2abs($DeleteGoTo,dirname(__FILE__)):"";
$DeleteQuery->redirect($DeleteGoTo);
}
?>



tblRatings.Rating is a string, so I put an s. Is that right?

Sign in to reply to this post

Ray BorduinWebAssist

I think you could use:

$DeleteQuery->addFilter("Rating", "IS", "s", null);

The data type shouldn't really matter for a null comparison, but technically, yes 's' is for string comparisons.

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

Chance

There is an error in your SQL syntax

<?php
if ((((isset($_GET["btn1_x"]))?$_GET["btn1_x"]:"") != "")) {
$DeleteQuery = new WA_MySQLi_Query($ThreeDW);
$DeleteQuery->Action = "delete";
$DeleteQuery->Table = "tblRatings";
$DeleteQuery->addFilter("UserID", "=", "i", "".$_SESSION['sessUserID'] ."");
$DeleteQuery->addFilter("Rating", "IS", "s", null);
$DeleteQuery->execute();
$DeleteGoTo = "AboutUs.php";
if (function_exists("rel2abs")) $DeleteGoTo = $DeleteGoTo?rel2abs($DeleteGoTo,dirname(__FILE__)):"";
$DeleteQuery->redirect($DeleteGoTo);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

Can I get FTP access to debug? You might be the first person to do a delete based on a NULL value and I might have to update the code to address it.

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

Chance

FTP information

I really appreciate your help.

FTP information attached in Private Message

Sign in to reply to this post

Ray BorduinWebAssist

I made an update to queryobj.php that should fix the problem. It wouldn't work with IS or IS NOT comparisons and nulls for delete in the current version.

I'll do an update to DataBridge to fix the problem, but it should be fixed in your queryobj.php file if you want to download it to make sure it isn't overwritten in the meantime.

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

Chance

Excellent customer service. Thank you

Sign in to reply to this post

Ray BorduinWebAssist

I can help you work on your site in a screen sharing session. You explain what you want, and I do it in front of you so you can see what I'm doing and ask questions. That service is $100/hr. You can just call the number at the bottom of every page on the webassist site to schedule a meeting.

This could probably be done in a 1 hour session.

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

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