Category "mysql"

"An error occurred during the signature verification." in apt-update after adding key 3A79BD29 and sudo apt-key del <old-key> on Debian

the server I work on is a Debian 9.13 OS and "mysql Ver 14.14 Distrib 5.7.34,". I tried downloading package information from all configured sources with the fo

Create stored procedure Insert and Update

I'm trying to insert and update queries at the same time in stored procedure, but I get a syntax error: #1064 - You have an error in your SQL syntax; check the

WPDB::prepare incorrect. The query argument of wpdb::prepare() must have a placeholder

having this error do you know what is wrong with my code? Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeh

i have this exception "org.hibernate.tool.schema.spi.CommandAcceptanceException:

this is my code package com.examplesector.choosesectors.models.Entity; import lombok.*; import javax.persistence.*; import javax.validation.constraints.Size;

why is this sql not using index with date type column

mysql:5.7/8.0 table ddl -- auto-generated definition create table test_date_index ( id int auto_increment primary key, account_id int not null, re

How can I define separate temporary table source name in a procedure?

I'm declaring a cursor in a stored procedure with following; declare cur1 cursor for select * from tmp_01; Here, my temporary table source is tmp_01. The sou

while() in while() or 1x Query?

I don't know which way would be better for PHP and SQL. I design and program my own comment system and I would like id2=0 its a comment and id2>0 its sub-com

How to find missing dates in a DATE column

I have this kind of date table: I want to find/detect all blank dates between them, or showing how many days it skipped. I tried: SELECT date FROM tbl_attenda

How to update MySQL column/row when datetime column < now?

I am making a platform where people can make bids on items for a price. I want to make it so that after a the expire datetime of the item, the database will aut

Insert NA values in Mysql table RMySQL

I am trying to insert a data frame row in a mysql table, but I have NA values in character and numeric columns. I'm getting this error: Error in .local(conn, st

How to configure Mysql Server to maximize performance

I hold a server with 12 cores CPU, 16GB RAM and 128GB SSD, using Centos as operating system, mainly for MySQL server. But I found that server always process que

How to query a column which value is null and use keyword `in` in JPA?

When I passing parameters a1 as "a1", a2 as ["a21","a22"] @Query(value = "select * from a where if(:a1 !='', a1=:a1,1=1)" + "and if(:a2 !='',a2 in (

SQL finding mismatches within the same column

SQL Noob here. I'm struggling with a (hopefully) simple SQL query and would appreciate if someone could help me understand if what I'm trying to do is even poss

Sql query to join query results

I have one query result as: Wname NewCases Mon 2 Tues 1 Sat 3 Second query result as: Wname FollowUp Tues 3 Wed 4 Frid

LEFT JOIN query returns only results existing in table 2

I would like to improve an existing (php/mysql) codebase that presents an overview of choir attendances (X axis: dates, Y axis: students). The data is spread ac

ODBC Connection Import Tables to MS Access fails with "Cannot define field more than once"

I need to create an Access database from an existing mySQL database. I was able to import some of the tables using the ODBC connection but a few of the tables w

Viewing SQL queries from all sources

I found this picture in a document. It shows the queries running on a given SQL database. It looks similar to DBeaver software. However, I couldn't find a way t

How to rank for this query

I want to generate the below result and here is my query SET @count:=0; SELECT Workout.created_by, SUM(Workout.training_load) as TL, FB_User.name from FB_Worko

Extracting data from the 2nd table by looking at the condition in a table with php

In my table named Follow, there is the information of those who are followed. For example, let's say my user id is 1: tableID | followerID | followedID ________

get max value of each column group by student ID

I have a table with columns like this Std_id Class Section 14 8 2 14 8 1 14 9 1 15 8 3 15 8 2 15