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

rating

Delete record using multiple values (filters)

Thread began 6/18/2020 1:39 pm by Steve | Last modified 6/19/2020 8:36 pm by Ray Borduin | 12 views | 2 replies |

Steve

Delete record using multiple values (filters)

Not a question but rather a solution in case anyone needs a tighter delete query:

php:
$DeleteQuery->addFilter("psaType", "=", "i", "".$companyType ."",  "AND ", "psaProject", "=", "".$projectTarget ."");



If you add a second variable to filter, just add the AND and parameters as shown above.

Maybe in the future the Filter will be like the Bindings view where multiple values can be set for more complicated Delete routines.
I just noticed I did not add a second "i" for integer. Optional?

Sign in to reply to this post

Ray BorduinWebAssist

This should actually be done with multiple filter calls like:

php:
$DeleteQuery->addFilter("psaType", "=", "i", "".$companyType ."");

$DeleteQuery->addFilter("psaProject", "=", "i", "".$projectTarget ."");



You can add multiple filters manually, it just isn't supported from the interface. They are always joined with AND and you can add as many as you want.

I don't think your example would work. I believe the second filter is ignored.

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

Steve

Thanks Ray,
I see the behavior rewrote my manually created filter by creating a new second filter

$DeleteQuery->Action = "delete";
$DeleteQuery->Table = "projects_companies_assigned";
$DeleteQuery->addFilter("psaProject", "=", "i", "".$projectTarget ."");
$DeleteQuery->addFilter("psaType", "=", "i", "".$companyType ."", "AND ", "psaProject", "=", "".$projectTarget ."");
$DeleteQuery->execute();



That explains why it was working. I did not see the additional line originally.

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