Creating a trigger to update one table’s row based on another update from a different table’s row

So, I have the following two tables:

CREATE TABLE IF NOT EXISTS `services` (   `services_id` INT NOT NULL AUTO_INCREMENT,   `staff_num` INT NOT NULL,   `health_and_wellness` INT NOT NULL,   `tutoring` INT NOT NULL,   PRIMARY KEY (`services_id`),   UNIQUE INDEX `services_id_UNIQUE` (`services_id` ASC) VISIBLE,   INDEX `fk_services_healthandwell_idx` (`health_and_wellness` ASC) VISIBLE,   INDEX `fk_services_tutoring_idx` (`tutoring` ASC) VISIBLE,   CONSTRAINT `fk_services_tutoring`     FOREIGN KEY (`tutoring`)     REFERENCES `tutoring` (`tutoring_id`)     ON DELETE CASCADE     ON UPDATE CASCADE,   CONSTRAINT `fk_services_healthandwell`     FOREIGN KEY (`health_and_wellness`)     REFERENCES `health and wellness` (`health_and_wellness_id`)     ON DELETE CASCADE     ON UPDATE CASCADE) ENGINE = InnoDB; 


CREATE TABLE IF NOT EXISTS `tutoring` (   `tutoring_id` INT NOT NULL AUTO_INCREMENT,   `subject` INT NOT NULL,   `staff_members` INT NOT NULL,   PRIMARY KEY (`tutoring_id`),   UNIQUE INDEX `tutoring_id_UNIQUE` (`tutoring_id` ASC) VISIBLE,   INDEX `fk_tutoring_subject_idx` (`subject` ASC) VISIBLE,   CONSTRAINT `fk_tutoring_subject`     FOREIGN KEY (`subject`)     REFERENCES `subjects` (`subject_id`)     ON DELETE NO ACTION     ON UPDATE NO ACTION) ENGINE = InnoDB; 

I want to create a trigger that updates services.staff_num whenever tutoring.staff_members is updated.. I’ve tried a couple different triggers, but each time nothing happens or I get an error.. My latest attempt was this:

DELIMITER $  $   CREATE TRIGGER UpdateStaffNum AFTER UPDATE ON collegedb.tutoring FOR EACH ROW     BEGIN         UPDATE services         SET services.staff_num = services.staff_num + tutoring.staff_members;  END; 

Which of course would be too simple too work, heh. Anyone have any suggestions on this? Thanks.

copy fields value to another field

When user registering on my site, they have to entry their phone number for auth (firebase).I have create the phone number field using buddypress’s xprofile plugin, the field named "phone". For some reason, I need to sync the Phone field to user_url field, I tried some plugin like SyncField ,BuddyPress to WordPress Full Sync to help, but the field cannot be sync without modify the content. Any idea to make it work?

copy postgresql db rows from one table to another depending on an id

I want to restructure my database. Therefore I want to move some columns from one table to another. The problem is that I do not want to simply insert the new column somehow into the destinationtable. Both tables have an id and I want to copy the column data depending on the id of both tables.


id bigint not null a character varying b date ... 


id bigint not null c character varying d date ... 

I have tried with insert into to no avail because this would add new rows in the destination table which is not what I want. Same with select into.

insert into table2 as t2 (c,d) select t1.a, t1.b from table1 as t1 where = 

WP-Rocket – Update license key from one person to another

Need a quick suggestion on updating license key information in WP-ROCKET plugin from one person to another.

We have couple of websites which are running with WP-ROCKET but the license key was mapped with the vendor who developed our sites. We wanted to update the license key details to another account which is owned by us. We don’t want to keep the license key with vendors account anymore & appreciate any suggestions on the same.

We’re advised to uninstall the plugin and re-install with our licenses but before that I need to know, if there any option to achieve it without removing/adding the plugin.

Thanks in advance.

Can I indicate (via robots.txt, meta robots or another approach) that one or more queryString parameters should be ignored by crawlers?

I’ve written my own SiteSearch Script in PHP.

The SiteSearch parses two GET parameters from the queryString:

  • search // the search-phrase
  • filters (optional) // indicating which parts of the site to include or ignore

I don’t mind GoogleBot and other crawlers reading the search parameter.

But I would like to advise crawlers to ignore the filters parameter, because a very high number of configurations of that parameter would simply return the same results – and an identical, duplicate page as far as the crawlers are concerned.

As much as I would like to add to my robots.txt file something like:

User-agent: * IgnoreParameter: filters 

this isn’t an option.

And a meta robots directive like:

<meta name="robots" content="ignoreparams[filters]"> 

isn’t an option either.

Is there any creative way I can enable crawling of the page and have crawlers ignore the filters parameter in the queryString?

Or am I stuck with a directive as unrefined as:

<meta name="robots" content="noindex"> 

if I don’t want to risk pages with identical search parameters (but different filters parameters) being crawled?

add another html tag after li element in wp_nav_menu

I have a nav menu in footer. I just want to display it side by a <p> tag, I mean something like this

<ul> <li> <p>copyright C 2021</p> </li> <li> contact </li> <li> blog </li> </ul> 

this is my menu function

if ( function_exists( 'register_nav_menus' ) ) {     register_nav_menus(         array(           'top_nav_menu' => 'My Footer Menu'         )     ); 

and I’m calling it in footer

<?php if ( has_nav_menu( 'top_nav_menu' ) ) { ?>             <?php wp_nav_menu( array(                 'menu' => 'Footer Navigation Menu',                  'theme_location' => 'top_nav_menu',                  'menu_class' => 'footer-links'                 ));              ?>             <?php } else {?>             <ul class="sf-menu">                 <?php wp_list_pages( array('title_li' => '','sort_column' => 'menu_order')); ?>             </ul>             <?php } ?> 

How can I insert an extra <li> element just before its first <li> and add a <p> tag between that later added <li> element?

Can a Werewolf actually hurt another Werewolf?

This came up today in Curse of Strahd. One of the werewolves wanted to aid the party in taking out some of her fellows.

It occurred to me that a Werewolf in hybrid form does piercing (bite) and slashing (claws) damage which werewolves are immune to.

Are werewolves actually immune to other werewolves assuming said werewolf does not have access to a silvered weapon?