Category "mysql"

i have created some sql queries for mysql php my admin but i still have doubts

(1) Use GROUP BY and NATURAL JOIN to show the lecturer names and the number of courses taught by each lecturer. (11) Use GROUP BY to show the course IDs, course

Where Condition on google auto complete address

I have a home search table with have a city column which can have multiple cities like "Avignon, France|Nantes, France|". Addresses are "|" separated. There's a

Azure Data Factory Copy Task Creates Gap In IDs

I have an Azure DataFactory copy task set up to copy employee data from a MySQL database to a SQL Server database. The data copies over fine except for the fac

Sequelize UUID with mySQL: Unable to set default value

I've been trying for awhile to set id (primary key) for my Users table as UUID. However, I keep getting this error: Field 'id' doesn't have a default value, whe

My php code loops and doesn't explore my database [duplicate]

Hello I'm currently trying to create a page based on a database under mysql that would update itself for a client. However what I'm trying to

XAMPP phpMyAdmin - Error when exporting database (windows)

I was trying to export my database from phpmyadmin but it said in the browser couldn't upload a file when I tried again and it loaded to an HTML file. index.php

Can anyone help me on how to fetch MySQL table/s data in JSON format by querying itself which is similar to MS SQL Server

Below is the existing T-SQL code which generates table data in JSON format just by using the keyword FOR JSON PATH, include_null_value. How to implement the sam

Populate dropdown2 from onChange event of dropdown1

I need to write a code where i need to populate a dropdown1 from mysql table based on the selection of another dropdown which also where in need to give values

Mysql 8.0, On unique keys but got duplicated rows

I am using Mysql 8.0, and something strange happened. I set the 'autoid' as primary key, and a group of keys as unique keys. SHOW CERATE TABLE below I use the

How to use MAX function in MySQL with the having clause

I am working with the employees table in SQL and I would like to fetch the data for max count of employees SELECT (COUNT(emp_no)) AS emp_count, dept_no FROM de

Set MySQL fetch mode globaly

We have recently migrated our application to a new server. Since our migration we are experiencing a lot of PHP message: PHP Fatal error: Call to undefined meth

Wordpress showing white screen with a form

I have a server in google cloud with Ubuntu 18. I have installed WordPress. It was working fine. But suddenly, this screen is shown SCREENSHOT / IMAGE Any help/

Python code to connect to MySQL database doesn't work on Google Colab

I wrote the code bellow. It works on a .py file on my computer but not while running on Google Colab) import mysql import mysql.connector as msql from mysql.con

Getting duplicate results from DB

let absent_remove = result_database.filter(item => item.absentday != absent_days) console.log("absent_remove", absent_remove); I got this piece of code, I h

Why am I getting a syntax Error on hackerrank SQL problem using window functions (partition by)

Hi I am trying to figure out why hackerrank is returning a syntax error on my query ran on their platform but when I run the same query I get no issues on mysql

Rails & MySQL on Apple Silicon

has anyone been able to get Rails running with the MySQL via the mysql2 gem on Apple Silicon? I'm working with Ruby 2.5.3 and Rails 5.2.3 but would love to hea

MySQL is not using composite index with ORDER BY clause

I have a table user that looks like this id | first_name | last_name | org_id This table has few million entries. I want to run the below query with an exact

Update the column in case of duplicate in mysql

So I am storing some config values in my table which looks like name value secret 1223 url "url" Now I have a situation where I want to update the secr

Truncating, Selecting data from multiple tables using joins and then inserting data into separate table in spring boot

I am using a spring boot application. I have multiple tables and using inner joins, I want to populate a temp table. Before populating, I have to truncate the t

Select the ORDER BY ASC|DESC according to a value

I want to select the order by type according to a variable. Something like this: ORDER BY t.name case when @sort = 'asc' then ASC ELSE then DESC END Is that pos