database – Best Solution For Creating and Maintaining Custom Records

I would like to configure my Drupal site as a utility so that the following can be done:

  • Input/create records for contacts or clients
  • Be able to select these records for updates and add new data via the webform

An example would be to be able to select a contact/client from a drop-down, then submit data on the remaining form fields.

I’ve been testing the WebForms module, which works great, but am not seeing a native way of querying existing table data, then adding records for it.

Am I overlooking how this can be done via WebForms, or will I need to create a custom module to create the table(s), query and update the data, etc.?

views – Best Solution For Creating and Maintaining Custom Records in Drupal (8) DB

I would like to configure my Drupal site as a utility so that the following can be done:

  • Input/create records for contacts or clients
  • Be able to select these records for updates and add new data via the webform

An example would be to be able to select a contact/client from a drop-down, then submit data on the remaining form fields.

I’ve been testing the WebForms module, which works great, but am not seeing a native way of querying existing table data, then adding records for it.

Am I overlooking how this can be done via WebForms, or will I need to create a custom module to create the table(s), query and update the data, etc.?

How to group records under certain conditons in mysql

I would like to join 2 tables and group user records based on user id and return its overall status.
Example. Lets say a user applied for a loan, he uploaded multiple documents to bank website which are required to approved by the bank. if all docs are approved by bank then the status must verified ,
If at least one document is “verified”, the overall status is “verified”.
If no document is “verified” but at least one is “in progress”, the overall status is “in progress”.
If no document is “verified” and “in progress”, but at least one is “expired”, the overall status is “expired”.
If no document is “verified”, “in progress” and “expired”, but at least one is “rejected”, the overall status is “rejected”.
If no document is uploaded at all, the status is “no xyz uploaded”.
(for documents without expiration date the status is “expired”)

Two tables : customer and customerDocs
user has id, name, phone email
customerDoc has id, customerID(reference key), verificationStatus, description, expDate

SELECT 
    cu.id CustomerID,
    CASE WHEN cd.verification_status = 'PAID'
     THEN 'PAID'
     WHEN cd.verification_status = 'PENDING'
     THEN 'PENDING'
     WHEN cd.verification_status <> 'PAID' && cd.verification_status = 'PENDING'
     THEN 'PENDING'
     WHEN cd.verification_status <> 'PAID' && cd.verification_status <> 'PENDING'
          && cd.verification_status = 'CLOSED'
     THEN 'CLOSED'
     WHEN cd.verification_status <> 'PAID' && cd.verification_status <> 'PENDING'
          && cd.verification_status <> 'CLOSED'
     THEN 'REJECTED'
     WHEN cd.expire_date IS NULL
     THEN 'CLOSED'
     ELSE 'No status'  END STATUS
FROM customer cu 
    JOIN customer_details cd ON cu.id = cd.customer
GROUP BY cu.id

I tried the above query but not getting expected output. So any help here

Using SPF and DMARC records to combat invalid email subdomains

I have been able to confirm that bad actors are sending emails from nonexistent subdomains of my company’s primary domain.

Let’s say my primary domain is foo.com. Email is sent from that base domain from my own mail system. Due to partnerships with a helpdesk provider, a e-commerce (storefront) company, and a CX/NPS provider, I also have three valid unique subdomains from which email comes from each (shop.foo.com, support.foo.com, and feedback.foo.com.

I have full DMARC w/ DKIM for all 4. With the invaluable assistance of DMARCian (a DMARC report aggregation & reporting service), I have confirmed that there are several sources of recurring email from other subdomains – ones that do not exist. For example, some unauthorized and unknown entity in VN is sending email from news.foo.com & enews.foo.com. Another source is sending from sales.foo.com. This last one is particularly of concern because the content of the few emails from this bad actor we’ve been forwarded is quite damaging to my company (we think it’s a foreign competitor in our fierce niche market behind it).

Unfortunately, my current DMARC polices are either monitor or quarantine; I can’t use a reject policy (that’s another battle.)

I am considering creating SFP & DMARC records for these nonexistent subdomains, with no allowed senders and a reject policy.

I’m not sure how effective this would be though. I also cannot think of any drawbacks, other than a bit of extra work to set it up and then maintain it when the bad actors start using different bogus subdomains. We’re always one step behind the bad guys, eh?

So… are there any drawbacks to what I am considering doing that I have not thought of? And do you think it’s worth the effort? Or is there a better approach to dealing with these bogus subdomains?

linux – BIND9 Sharing some domain records across views for a same domain

everyone i have a design problem in my bind configuration i have 2 view with the same zone caen2018.com (splitted for 2 different lan CAEN, PARIS)

topology representation

in each zone i have DDNS record but i want my DDNS record to be shared between CAEN lan and PARIS lan so instead i could do only 1 view for CAEN and PARIS right ?
But i couldn’t because i have specific record depending of the lan like the sip one (for the asterisk)
who is a CNAME of SRVCAEN on Caen and a CNAME of SRVPARIS in Paris also the ISP A record is pointing to the closet ISP interface depending of the site 152.36.2.1 on CAEN, and 152.36.2.5 on PARIS.

So the question is how i can do to shared DDNS records between sites but keep specific DNS record of the site (sip CNAME record, ISP A record) for a same domain ?

for now i have the following:
in named.conf.local

(...)
view "caen-lan" {
   match-clients { "caen-lan"; };
   zone "caen2018.com" {
      type master;
      file "/var/cache/bind/db.caen2018.com.clan";
   };
};

view "paris-lan" {
   match-clients { "paris-lan" };
   zone "caen2018.com" {
      type master;
      file "/var/cache/bind/db.caen2018.com.plan";
   };
};
(...)

sql server – Delete more than 50K records in SQL table

We have 5 Lacs records in a SQL table. Below is table structure

UserID varchar

FirstName varchar

LastName varchar

Address varchar

We need to delete 50K records in this table. We tried below approach

Approach 1: This has 50K DELETE statements which takes around 40 minutes

DELETE FROM (dbo).(Table) WHERE UserID = ‘tom345’

DELETE FROM (dbo).(Table) WHERE UserID = ‘john45’

and so on until 50K DELETE statements

Approach 2: This contains all 50K user id in IN statement but it takes more that 40 minutes

DELETE FROM (dbo).(Table) WHERE UserID IN ( ‘tom345’, ‘john45’, …. )

Is there any other approach which takes less time comparatively?

Thank you

IS THERE A MECHANISM IN THE REPLICATION THAT DECLARES THAT ALL THE PUBLISHER'S RECORDS HAVE REACHED TO SUBSCRIBERS

We have a scenario in which material document postings are made in the plant and purchase invoices are posted at headquarters (against these material documents) to control the company. We have a two-way transactional replication setup between headquarters and factory. It often happens that material confirmations that arrive at the location of the plant do not reach the headquarters for jacking or purchase invoices that have been posted at the headquarters do not reach the factory and the replication monitor does not display an error. When a request comes in, we have to check manually. This leads to confusion when making decisions. Is there a way in replication to determine whether the affected material receipt entries from the plant location have reached the headquarters and whether the entries from the headquarters posted by the purchase invoice concerned have reached the plant location, OR a mechanism by which the gap between the two can be checked daily.

7 – After creating a module, is it possible to create a table that shows records in the administrator configuration form?

Background of the question:

I worked on a module that the user can vote with and that works well. I use the cookie concept for voting. I also created config below on the admin site. (Please check screenshot). It has a simple workflow like this:

Enter the image description here

  1. The user will go to the voting page
  2. The user will vote for the right candidate
  3. The voting is updated and cookies are set.

Planning for updating the module:

I plan to add voices based on the IP address. I have just declared the IP address option. The problem is that I have already created a module without a schema.

Problem:

  1. Is it possible to add a custom table to the database after creating a module?
  2. Is it possible to create a table in the administrator configuration form to display records?