database – Create a rule in drupal 7 and inject the mysql code

Can I create a rule on my drupal 7 website and that rule:

When a user has logged in (only users who have logged in can see this content) and click on certain content, I want to write a mysql update statement in my database. The username of that person and what content was clicked on.

I know I can execute PHP code for my action but I'm not sure if I need to convert mysql and php together in some way. Please, if someone knows and could give quite detailed instructions, I would greatly appreciate it!

Thank you

How to configure signed certificates of Root and Leaf SSL in Ubuntu 18.10 Postgresql 11 Database and Windows 10 Power BI plus PostgreSQL?

I have Power BI and PostgreSQL 11 installed on Windows 10 and my main PostgreSQL 11 database on Ubuntu 18.10 Linux. I edited the postgresql.conf Y pg_hba.conf files correctly in the IP addresses that my Windows 10 computer uses with PostgreSQL 11 and Power BI to connect to my Ubuntu PostgreSQL 11 database. However, I got errors in Power BI and could connect manually through the command line .

After solving problems with Microsoft support, they told me:

This indicates that the Postgresql server does not have its certificates configured and, therefore, can not connect to PowerBI. To allow the client to verify the identity of the server, place a root certificate on the client and a sheet certificate signed by the root certificate on the server. To allow the server to verify the identity of the client, place a root certificate on the server and a leaf certificate signed by the root certificate on the client. One or more intermediate certificates (generally stored with the sheet certificate) can be used.

However, I'm confused by the tutorials in

I can not know what steps should be done on my PC with Ubuntu and what steps should be done on my Windows PC. I do not know if special steps are needed to configure Power BI with the certificates. How do I configure my bidirectional certificates?

Can someone offer a very detailed tutorial, tell me & # 39; how & # 39; Read a tutorial or explain the steps in an answer, please?

authorization – What is a profit when storing the jws token in the database?

Recently, someone mentioned that you are using the JWS token for authorization, but the JWS tokens received through API calls are validated against the assets stored in the database.

In my opinion, the verification of signatures is just a waste of resources, but the person who designed the system insists on using JWS since it ensures that it is safer.
Did I miss something? Is it the right way to go?

debugging – 766 security update database schema errors

After updating to 7.66 and running update.php, an error appears:

The name of the class must be a valid object or a string in /home/breastcancertiss/public_html/includes/ in line 8066

I have 6 schema updates as below:
766 scehma updates

Where do I begin to debug this?

Grouped Index in Postgresql – Database Administrators Stack Exchange

I know that PostgreSQL does not name indexes as grouping indexes by default. If I want to have a grouped index, I can manually group a table along an index. But I have a question about that. Do all tables have exactly grouped index? What is the advantage and the disadvantage for the performance of db?

How can I get a secondary database node (Firebase) – React Native

When I bring my data through a Picker so that the user can edit it and thus update the Task data, n update, doing some tests I have noticed that you need the code of the task to be able to update the table & # 39; but I do not know how I can put that code so I can edit and send the correct data.

    builder () {
super ();
this.state = {.
the status: & # 39; & # 39 ;,
description: & # 39; & # 39 ;,
the value: & # 39; & # 39 ;,
TITLE: [],
title_selected: ""
this.cadatroanuncio = this.cadatroanuncio.bind (this);
firebase.auth (). onAuthStateChanged ((user) => {
if (user) {
(for example, in the event of an error,
let state = this.state;
state.titulo = [];

snapshot.forEach ((childItem) => {
state.titulo.push ({
key: childItem.key,
Title: childItem.val () Title,.
status: (String (childItem.val (). status)),
Description: childItem.val () description,
value: childItem.val () value,
this.setState (status);

RegresarDatosAnuncio = ((title) => { ((item, index) => {
(If not,
// Update form fields
this.setState ({title_selected: item.title, status: item.status, description: item.description, value: item.value});

// code I do to create and now pro update ...

if (this.state.titulo.length> 0) {
firebase.auth (). onAuthStateChanged ((user) => {
firebase.database () Ref. (& # 39; tasks & # 39;). Children (user.uid) .set ({
Title: this.state.title,
Description: this.state.descricao,
Value: this.state.valor,
State: this.state.status,
("Updated task");

() {} ()
return (

            Select the ad:
            Ad Title:
                this.RetornarDadosAnuncio (ItemValue)}>
{ ((item, index) => {
return (
            Ad Title:
                  this.setState ({title})}
            Ad description:
                this.setState ({description})}
            Ad Value:
                this.setState ({value})}
                this.setState ({status})}
onValueChange = {(itemValue, Index) =>
this.setState ({status: itemValue})
              Reload this page


8 – Retrieving only the first row of the database

You can simply write (example get node) 🙂

$ result = db_query (& # 39; SELECT n.nid, n.title, n.created FROM {node} n) -> fetchObject ();

If you want to get a unique value, you can use fetchField ()

Example (obtain the node title):

$ node_title = db_query (& # 39; SELECT title FROM {node} WHERE nid =: nid & # 39 ;,
array (& # 39 ;: nid & # 39; => $ nid)) -> fetchField ();

Database design – SQL Server (sym408)

Taking into account that the database is constantly updated, analyze some of the possible problems that may arise if the administrator wishes to obtain the same extract every month. Discuss the recommendations you would make after analyzing the potential risks. Justify the recommendations with reasons, facts and examples.

Database – Malware on the old website – How to migrate?

I was hired to build a new website for a company that, for a long time, the website has turned into a garbage fire. Then they asked me to migrate more than 1000 blog posts from the previous website to the new website. This has come with its own problems, since everything runs on old versions of everything and the export is massive. During all this troubleshooting, I was informed that the previous website has something called a "zeus" virus. So, my question is, is it likely that importing the database to a new site will also import that malware and, if so, is there a way to ensure that I'm only copying the required information?

Thank you!

magento 1.9 – Multiple database records with the same primary key

I need to store relationships where only one attribute_id It can be visible in multiple store_id and I was trying to use attribute_id as the main key. It would be something like this:

+ -------------- + ---------- +
| attribute_id | store_id |
+ -------------- + ---------- +
| 147 | 1 |
| 147 | 2 |
+ -------------- + ---------- +

But Magento does not see that with good eyes, since it returns the exception. The article (foo) with the same ID "x" already exists.

What is the best solution for that problem?