Check IDs from different tables – Phpmyadmin
I have two tables: “rota” (1) and “volunteer” (2). The first name and last name columns are in (2), but the shifts in (1). With the following query I am able to see the names of those who have submitted…
I have two tables: “rota” (1) and “volunteer” (2). The first name and last name columns are in (2), but the shifts in (1). With the following query I am able to see the names of those who have submitted…
I want to see new records and updates entered in the log table, I created a trigger for this but I get error 1442. Can you help me, please? CREATE TRIGGER `trigger_changes` AFTER UPDATE ON `customers` FOR EACH ROW Update…
Hello everyone I'm going to try to explain my problem as clear as possible, feel free to ask me more precision if you didn't understand what I meant and forgive my mistakes, English is not my mother tongue. My goal…
I'm doing a PDO UPDATE query to MariaDB database. $query = "UPDATE :table SET `name`=:name, `title`=:title, `description`=:description WHERE id=:id"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':table',$this->table, PDO::PARAM_STR); $stmt->bindParam(':id',$this->id, PDO::PARAM_INT); $stmt->bindParam(':name',$this->name, PDO::PARAM_STR); $stmt->bindParam(':title',$this->title, PDO::PARAM_STR); $stmt->bindParam(':description',$this->description, PDO::PARAM_STR); $stmt->execute(); It seems to me that everything is…
I have the next query to get the 15 most sold plates in a place: This query is taking 12 seconds to execute over 100,000 rows. I think this execution takes too long, so I am searching a way to…
I have written a query for use in a Prestashop 1.6 module and was surprised to see that LIMIT doesn't work in the query. The plan is to get the top 10 best seller products. I have tested it in…
I want to search for data from the database using MySQL like query here is my query: global $wpdb; if($_GET['search']){ $search = $_GET['search']; } else{ $search = $_GET['searchtop']; } $search_details = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM tbl_brand, tbl_generic, tbl_therapeutic_area, tbl_drug…
I use mysqldump command to dump the some information from the sql tables. To do this I read about mysqldump. Then for a test I made a direct command which will run able in the terminal shell. That command were…
Clearly, adding indexing to Mysql tables speed up access. Does WordPress generates this simple optimization or should I perform it manually, or use one of the many optimizations plugins? For example: in phpMyadmin all you need is to select table…
I'm trying to migrate a db from: MySQL Distrib 5.5.60-MariaDB, for Linux (x86_64) to: MySQL 5.5.4, UNIX I tried importing the db as a zip package and it started throwing errors so now I'm trying to re-create each table one…