Category "mysql"

Pythonanywhere MySQL-Connetion from outside

I tried to connect to my MySQL-Database from my Home-PC and got the error: 'Can't connect...' Inside this Server with Skript and Konsole I've got no problems, b

MySQL importing and replace [duplicate]

I have a table with 2 columns: Id | Date 1 | 2022-04-01 With tons of row, like 30k I need modify all the dates, so I want to upload a CSV wi

how to fetch data and tag Element but not json data using axios from php Apache server in XAMP?

I have a front end code of react is import React,{useEffect,useState} from "react"; import axios from 'axios' export default function DataGridDemo() { con

Get top n records for each group of grouped results

The following is the simplest possible example, though any solution should be able to scale to however many n top results are needed: Given a table like that b

Uncaught Error: Class 'Service\UsersService' not found

I'm trying to run my php-based application, which connects to a mysql DB, launched through docker-compose. i get this message when i connect to localhost: Fatal

Query to get Woo products in a parent-children order

I want to build a MySQL query for a Woo database schema to get simple/variable products, but in a specific order: I want to get them in an ID ASCending order, b

Modify MySQL query to produce to right data

I am trying to produce a data from a football table. The table can be seen below and the data that is needed is highlighted. The data that needs to be produced

Trying to utilize a window function instead of this script

I'm trying to improve my query for this topic at hand. I'm trying to find the top 5 and bottom 5 growth rates per state from 2020 to 2021 in my org. The table h

What does a zero value coalesce function do?

I have been exploring dbt tools and I came across the following code snippet : coalesce(customer_orders.number_of_orders, 0) as number_of_orders I understand th

Mysql WHERE condition against a JSON_TABLE value

I got a list of IDs as comma seperated list of JSON values and some example data sets are like below [340596,340597,340595] This list can be huge sometimes 50k

Generate sales report using MySql and Php

I m looking for advices in report generating per client, per product, per salesman, in a given period, using mysql and php. I m currently working on an applicat

Getting records by date is multiples of 30 days

I have the following query to get appointments that need remind once a month if they are not done yet. I want to get records with 30, 60, 90, 120,etc... in the

Get mySQL full text match score for strings not in the table (optimally in a mixed result set with matches from the table)?

This must be a niche scenario since I have not been able to find a similar question around and in my brief testing in my SQL workbench just using the string in

How to error handling curl and mysql in python subprocess.run()

I have python script which uses subprocess.run() getting dump file by curl and input dump file by mysql cmd = "curl {0}/{1} -o /tmp/{2}".format(dir_name,file_na

Mysql get end date excluding weekends

in Mysql I am trying to get end date excluding weekends like my function GET_DATE_WEEKDAYS('2022-03-24',5) giving - 2022-03-17 which is fine it is giving issue

Error Code: 1265. Data truncated for column at row 1 when I tried to input csv file to MySQL

I created a table with a query: CREATE TABLE Department ( EmpID INT NOT NULL, Designation VARCHAR(80) NOT NULL, Department VARCHAR(80) NOT NULL, PRIMARY KEY(Emp

OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '0.0.0.0' ([Errno 111] Connection refused)")

I am attempting to connect a FastAPI with sqlAlchemy to a mysql db container. I am using the alias. Unfortunately it wont connect and I don't know why. Using My

Simple React/Heroku site not working when deployed, but works locally

When running this site locally, no problem. I have my server/client in different folders and the server is set to update the database on Heroku. I have one simp

Trying to send data from query to another function

first i have two problem here the first problem when i run this query it gives me this Error //ERROR SQLSTATE[42S22]: Column not found: 1054 Unknown column '390

how to link two tables in the same database?

Trying to link two tables that are in one database please help with syntax