Questions tagged [mysql]

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs which all use their own dialects of SQL to manage the data.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Node mysqljs. How to properly close connections

I'm using mysqljs to access MySQL with javascript. I would like to point out that this process seems to work fine if a single piece of data. I am feeding into my code a large set of data, to be ...
-1
votes
0answers
5 views

Returning to a webpage after MySQL handshake

For coding practice, I'm trying to make a faux, IGN-esque videogame review site. The site uses node.js to run a server on my computer. The site takes data from a database to fill in a table of ...
0
votes
0answers
5 views

How to build a table which content becoming row

I would like to make a query on table as below: enter image description here b.sostatus required to become column title, and summarise the count of orderno My SQL as below: ` select b.orderTime ...
0
votes
1answer
10 views

Get result of 2 queries with 1 query

I have 2 following queries in the same table transactions. transactions table has following 2 columns which is relevant here, registrationId,total and totalPaid. To get all the paid transactions I ...
-1
votes
0answers
8 views

Stored procedure with 2 input parameters & 1 output value that includes decision making structure

I am doing a homework assignment where we are asked to create a stored procedure that has 2 input parameters, 1 output value and includes a decision-making structure. I am having trouble finding what ...
0
votes
0answers
8 views

Docker MySQL shutdown immediately after startup, no visible errors in logs

I follow the instructions on the Docker Hub MySQL page (https://hub.docker.com/_/mysql) by running the command (excluding the $) $ docker run --name mysql8016 -e MYSQL_ROOT_PASSWORD=password1 -d ...
0
votes
0answers
6 views

MySql workbench - cursors

Why can't I do this? I want to search for the nearest value greater than the value of my cursor from TABLEA, perform an averaging function on the two and put the result in test3. I get the error code ...
-1
votes
0answers
16 views

File upload php php native

I'm trying to create data insert file a JSON string from a API webpage but get the error I create API insert image, but cant insert data on server API This library function create data My native ...
0
votes
1answer
13 views

Charting the data from database and merging row with the same value

I want to create chart that read the category column in my database.. I have repeating category because its general term and i notice this. i have many "short" slice.. i dont have any idea how to ...
-3
votes
0answers
18 views

Is there a way for me able to display logs by user - PHP Codeigniter

I am currently making an attendance monitoring system that records users logged in time activity. I am using MySQL and Codeigniter for the framework my problem now I don't know how to display logged ...
1
vote
1answer
20 views

MySQL Get unique conversation and last messages ordered by date

I'm making a messaging system. I want to retrieve specific user's conversations with content (this user can be both sender or receiver) ordered by date. I looked for every question online but none of ...
-3
votes
0answers
14 views

NullPointer Excpetion Java Minecraft MySQL

I am developing a Minecraft / TeamSpeak³ Verify System right now. But when I wanna connect to my database it gives me a java.lang.NullPointerException . Here ist the code public class MySQL { ...
0
votes
2answers
20 views

SQL Default value current date and time

So I have this table created: CREATE TABLE Hospital_MedicalRecord( recNo CHAR(5), patient CHAR(9), doctor CHAR(9), enteredOn DATE NOT NULL, diagnosis VARCHAR(50) NOT NULL, ...
2
votes
2answers
29 views

Do all subqueries in CASE..WHEN get executed, even if only one condition is met?

Say I have a query with subqueries in CASE...WHEN...THEN like this (simplified, as the real query I'm working on is little harder on the eyes): SELECT CASE WHEN (subquery1) = 1 THEN (...
0
votes
0answers
6 views

Is there a way to automatically update data on mapbox from mysql server?

I have a mapbox application that I am working on and I want to have it update the title set that it is using automatically using the data in the MySQL server. The query would remain the same but the ...
0
votes
0answers
15 views

Delete mySQL database rows based on a dataframe

Let us say I have a dataframe : data = pd.DataFrame({"company" : ['abc','def','xyz'], "amount": [1,1,1]}) I want to remove (from a mySQL database) N rows that match '...
0
votes
0answers
19 views

speeding up seek pagination with complex queries

I am working on an API with an underlying MySQL database. I have some complex queries that involve multiple joins and some of these tables are huge (> 200 million rows). I am using seek pagination ...
1
vote
2answers
31 views

SQL select row if column equal to row

I got this table: | NINumber | fname | lname | mentored_by | --------------------------------------------- | DD1199XYZ | John | Smith | DD234CD1X | | DD0094CYY | Barry | Gibbson | DD0094CYY ...
0
votes
1answer
21 views

MySQL (or Mariadb) Expression with DATEDIFF and DATETIME() OR NOW()

What is wrong here? CREATE TABLE `actionAngebot` ( `createdAt` DATETIME NOT NULL, `expiryDat` SMALLINT DEFAULT UNSIGNED AS (DATEDIFF(`createdAt`, DATETIME())) STORED ) ENGINE=MyISAM; SQL ...
-2
votes
0answers
18 views

Google Cloud SQL [MySQL] cant update

I've just migrated my MySQL to Google Cloud SQL using MySQL. I can connect and execute select queries but when I try to update this not working. In my database I have a table called "xxx_users" and a ...
0
votes
0answers
11 views

Should we await a sigificant difference of performance between a standalone Neo4j website backend versus a Neo4J + MySQL solution?

We are working with a friend on a website concept based on erotic essays with collaborative writting. She has a very good pen and we both have knowledge of web development. The key is to keep the ...
0
votes
1answer
16 views

codeigniter JOIN returing wrong id

I'm new to codeigniter and have got stuck on an issue with a JOIN. i have 2 tables super_admin_staff and super_admin_roles super_admin_staff has a unique id column named 'id' it also has a column ...
0
votes
0answers
10 views

How to add records to third table in a many-to-many relationship via a NotInList event?

Background: I'm creating an access form frontend for a MySQL backend. Here are the relevant relationships for this question: Image I've got three tables: People, PeopleHasInterest, and Interest. ...
-5
votes
0answers
23 views

Convert mySQLi to PDO [closed]

Hello soon I have to transform this script using mySQLi to PDO. The system uses all orientation of this script (insert, update, remove, list and pagination), I don't know how to convert to PDO, and ...
-1
votes
0answers
14 views

Column ways show multidimensional array data in a html table [closed]

many times i am trying to show output column ways, but i do not success to get the expected result. i have a big amount of data collection i am trying to show data column ways on html table. i ...
-2
votes
0answers
18 views

Trying to display two data into one table

What I'm trying to do is merge data from two database table into one table output. The below code is where I display data from table event. And I'm trying to insert one more row that is 'name' from ...
-4
votes
0answers
8 views

How to create a MySQL create function to display a name and birthday as the following 'John Daniel Dec 6th 2009' [closed]

create function with an input of VARCHAR(32) that returns VARCHAR(64) displaying a name and birthday as the following 'John Daniel Dec 6th 2009' Instructions to just create a function. No data table ...
0
votes
2answers
40 views

(Beginner) SQL query throws up errors for no reason

I'm a beginner and have no idea what to do! This is clearly not working I'm using phpmyadmin importing code manually by hand from postgresql CREATE TABLE IF NOT EXISTS CUSTOMER ( CUSTID ...
1
vote
0answers
22 views

Python: Creating tables in SQlite, MySQL or Postgres with user input as table name?

Is it possible to create a table with a user's input as the name of the table? c.execute("""CREATE TABLE *User input*( license_no integer, ...
1
vote
0answers
16 views

Gatsby - Getting undefined for MySQL id

I want to get into Gatsby. My current problem is, that i can not get the "id" from mysql database. The result for "id" (Primary "AUTO_INCREMENT") is "mysql__Homepage__undefined" (expected "16" - ...
1
vote
2answers
40 views

Selecting unique players' scores from two columns with bubble sorting

I have a very interesting challenge that I'm either looking too hard at (and missing a simple solution), or it is more complex than I can figure out heh Essentially, I have a game that tracks scores. ...
-1
votes
0answers
30 views

Efficient way to create all combinations of conditions and modifiers as SQL views

First off I'd like to apoligize if the wording of this question is weird or off, I really don't know how to word it better. The core idea I'm trying to solve is creating a bunch of views of a single ...
0
votes
0answers
13 views

Create trigger in mysql to transfer from one table to another

I am trying to insert values from table 1 into table 2 after table1 updated with new row. However my code doesn't work. I got error code: 1064 saying " You have an error in your SQL syntax; check the ...
-1
votes
1answer
22 views

filter record by current date on FIND_IN_SET() Function

im using Find Inset Function From Mysql to get results. SELECT Finalpoint As Finalpoint, Ticket As Ticketnum, Task_Details As TaskDetails, AssignDate As AssinDate, IF( ...
-2
votes
2answers
25 views

Check if registry has been deleted with python

How can I check if database data is missing? if cur.execute('DELETE FROM products WHERE shop = 5'): print('deleted sucess') This code doesn't work and I didn't find how I can validate if ...
0
votes
0answers
8 views

MySQL has a differnet IP from the host computer?

I'm working on a clients computer network. On the network, there are two computers A and B lets call them. Computer A has an IPv4 of 192.168.250.50 according to the ipconfig Computer B has an IPv4 ...
0
votes
0answers
13 views

How do I enter data into a MySql base from select from an Oracle base?

I've read a lot of questions about that but i couldn't find one that make Bulk insert. I use the following code to insert into my MySQL-Database from Oracle-Database: string ConnectionString = "...
0
votes
0answers
9 views

Thymeleaf & Spring images generation from DB - will run into a strange behaviour

I am working on a project & I am using Thymeleaf with Spring to create web pages, but I can not seem to get images generation working properly. I have them in my database, so they are generated ...
0
votes
0answers
24 views

What do you think of this approach? I want to reuse data from previous functions to avoid calling twice the same function

So I have three functions involved in the process of obtaining information about a customer: A function executing an SQL query to the database, A function making some complex calculations with the ...
0
votes
1answer
29 views

C# Stored Procedure with Dapper's Dynamic Parameters not working

I'm writing a C# application to retrieve recipes from a MySQL database, using Dapper for ORM. So far, I've written my DAL in C# with direct queries (Which I know is unsafe), and this works great. I've ...
0
votes
1answer
19 views

Python peewee sqlite database open in phpmyadmin?

I started using Peewee for a project to store some information, and I am wondering if there is a way to import the local database into phpmyadmin to be able to better view and interact with the stored ...
-1
votes
0answers
16 views

SQL Queries Finding Table under specific condition [closed]

I need help figuring out the query where if all my borrowers are borrowing from a branch. In this picture, the answer is branch 1 because Branch 1 contains all borrowers. Table Number 1 If I have ...
0
votes
2answers
29 views

Mysql ful outer join

I have a table named 'emails': email domain timestamp [email protected] google.com 2019/12/08 [email protected] google.com 2019/12/08 [email protected] google.com ...
0
votes
1answer
29 views

Select one before last in MySql custom function

I want a function that given a N returns the N-1th Product name from the Products table sorted by the Sales column The Products Table: CREATE TABLE Products( ID int NOT NULL, Name varchar(...
0
votes
0answers
7 views

Cakephp 3.x all values of array in multilevel joins

first important structure of my database: teachers id, int username, varchar certificates id, int teacher_id, int vality_date, date languages id, int certificate_id, int language_id, int Teachers ...
0
votes
1answer
19 views

MySQL type conversion while ignoring nonnumeric characters

How do I convert from varchar(500) to float in MySQL while ignoring non-numeric characters? My code currently looks like this select distinct(customer_id), cast(val_amt as float) from( select ...
0
votes
1answer
24 views

How do I change the default Django engine database from db.sqlite3 to a mysql database populated with test data?

This is my first time doing this so please bear with me. What I am trying to do: Change the 'DATABASES' setting in my 'settings.py' from the 'ENGINE: 'django.db.backends.sqlite3' to a pre-populated ...
0
votes
1answer
16 views

Homebrew [email protected] The server quit without updating PID file in Catalina

I am trying to install [email protected] through Homebrew in Mac OS Catalina following the link - https://gist.github.com/operatino/392614486ce4421063b9dece4dfe6c21 and when I try to start the server via ...
-2
votes
0answers
26 views

PHP MySql Database entry in two tables [duplicate]

I am currently developing a listing webpage. The user should be able to insert information about his car and his personal information. These information should be stored into a mysql database. My ...
-1
votes
4answers
29 views

Find the rows with same values of different columns in SQL

I am working with a table [user] which has following columns user_id | em_id | em_id_original --------|-------|--------------- 1 | 32 | NULL 2 | 43 | 32 3 | 14 | ...