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

QSqlDatabase: QMYSQL driver not loaded Ubuntu 19.04 and Qt5.12

I am working with Ubuntu 19.04 and Qt5.12 and am trying to write a small GUI that connects to a SQL Server database, but no matter what I tried I continuously get the following error: QSqlDatabase: ...
-1
votes
2answers
10 views

I want to find a user who tried 3 logins in 5 minutes. in mysql 5.7

this data in mysql5.7 I want to find a user who tried 3 logins in 5 minutes. Is this possible with mysql query? id type date a login 2019-10-17 10:01:00 a login 2019-10-17 10:07:00* a ...
-1
votes
0answers
9 views

MySQL Sakila DB Query to C

I have two questions using the Sakila DB, as follows: 1 - Find for each customer X, another customer Y who has rented at least one movie in common with X. Find all such pairs of Customers (X, Y) and ...
0
votes
1answer
15 views

Which join should I use for this mysql query?

I have a table 'PR' that has a specific TraceID and another table called 'BA' has a 'PAYMENT_ID' and (sometimes) a TraceID value that I have to extract from a column 'MISC' to then match the BA and PR ...
0
votes
1answer
14 views

“MYSQL: How do i put numbering? ” [duplicate]

I am trying to find a MySQL query that will put numbering on each DISTINCT values. id name ----- ------ 1 Mark 2 Mike 3 Paul 4 Mike 5 Mike 6 ...
0
votes
2answers
25 views

MySQL Join 3 tables by 2 columns ids in the first table

I have 3 tables... Contacts, Outbound Operator, Digital Operator. The contacts table contains all the contacts generated by either outbound operator and digital operator. So I will have these columns ...
-1
votes
0answers
11 views

I want to show an array with checkmarked entries from a mysql table and allow changes to be made on form and submitted

I have a website and database of voyages that is related to crew (list of all potential crew) and voyage_crew (crew on each voyage). When creating a new voyage I had set up a form to pull a list of ...
1
vote
1answer
21 views

Subqery driving NULL values into outer query

i keep getting NULL rows in a nested query provide we have the following tables: 'article' containing article information 'bom' containing an m-n relation between article IDs, forming a bill of ...
0
votes
0answers
16 views

Larvel 5.7 - Advanced where() query inside a when() function

I am having problems with a query that uses values from multiple form inputs, and each one is optional. The idea is to find the applications of an ISP (ie. technical services, installations, etc) ...
0
votes
2answers
22 views

Filter bigquery table based on Id and dates from another table

Hi I am very new to big query and I am trying to get some data using two big query table. The first table has id and purchase dates and the second date has all the user activity with a date column for ...
-2
votes
0answers
14 views

What is the best way to architect DB to enable user defined heterogeneous data?

I have a web based data acquisition app intended to track several dissimilar data-points over time and be able to report aggregate values from those observations. Originally the requirement was for 3 ...
0
votes
1answer
17 views

MySQL Question - Find the title and year of each movie that someone rated with 5 stars and someone else rated with fewer than 3 stars

I am provided three tables, one called Person which has an id (primary key) and name attribute, a Movie table with title, year (where title and year together are the primary key) and finally a Saw ...
0
votes
1answer
13 views

Multi INNER JOIN gives unexpected duplicate records

Running the following SELECT query gives unexpectedly two times the same record while there is only 1 product in the database. The are however multiple subcategories linked to the same category, but I ...
3
votes
0answers
32 views

Use alias in nested select subquery

I have the below query: SELECT t.*, (SELECT SUM(subs) FROM (SELECT … FROM (SELECT prod_id, COUNT(*) subs FROM subscriptions s WHERE s.begin_date < t.week_of + interval ...
0
votes
0answers
7 views

Local installation of eZ Platform can't connect to MySQL database

I'm trying (in vain) to run eZ Platform locally (macOS v10.14.6) following the guide @ https://doc.ezplatform.com/en/latest/community_resources/installing-on-mac-os-and-windows/. I used Homebrew to ...
-3
votes
0answers
12 views

Wpforms send data to a custom MySQL table with all the same fields [on hold]

I'm trying to send the data I collected from a Wpforms forms to a MySQL custom table that has the same fields (In the same moment users click the submit button). I saw that I can use the ...
0
votes
0answers
20 views

Change multiple values per row - based on dynamic rows with different values using MS Excel?

So I have 2 Excel Sheets. Excel Sheet A has usual address data like this (800 rows): Columns: Name, Street, Postal code, City, Phone, Email Excel Sheet B has follwing columns but (7 rows per 1 row ...
-1
votes
0answers
9 views

Java connectivity with MySQL over LAN

How do I connect my java application with MySQL that is running on another PC over LAN
0
votes
0answers
8 views

Exporting MYSQL Favorites to New PC

I just received a new upgraded work pc and my old ones has all of my saved/favorites mysql reports. I need to transfer them from the old pc to the new one. Is there any way to easily do this? We ...
0
votes
0answers
12 views

Why my CakePHP program doesn't save one of the inputs?

Why this code doesn't save the research field input to the database? It does save the username and the hashed password. I used this tutorial. src/Template/Users/asd.ctp <?php echo $this->...
0
votes
0answers
9 views

how can I fix NHibernate.Cfg.HibernateConfigException

I found an error while making an example of applying nebernate, but I don't know what the problem is. Look at the code here and find the part you want to modify. my database is mysql and I changed ...
0
votes
2answers
22 views

MYSQL SET UPDATE table from a variable

Need to be able to UPDATE a MYSQL table with string data. Get errors no matter what I try, and I have researched and nothing suggested works in this situation. '$soldout' '"$soldout"' {$soldout} '{$...
0
votes
0answers
20 views

why does my loop doesnt work inside modal?

I'm trying to display a set of buttons, that when clicked will display a table of data taken from the database. each button should display a different row, so I'm using 'for' to loop each button and '...
0
votes
0answers
8 views

How to call stored procedure in Entity Framework Core with input and output parameters using mysql

I am using ASP.net Core 2.2 with Entity Framework core 2.2.6 and Pomelo.EntityFrameworkCore.MySql 2.2.0 for connectivity with MySQL, I have a stored procedure which takes 3 input parameters and 1 ...
0
votes
0answers
30 views

Why so many collisions with the MariaDB 10.2 RAND() function?

Note: Running MariaDB 10.2.27 on Windows Server 2012 R2 Standard. I wanted to generate random integers for use in MariaDB so I have been experimenting with the MariaDB RAND() function. Either my ...
0
votes
0answers
12 views

Best practice when persisting a JSON object using Hibernate

I have an use case such as this: I want to know if its possible to convert a JSON received directly into a JPA Entity which can then be saved by passing it to a Repository method For instance, the ...
-1
votes
2answers
26 views

How to create a conditional calculated column in SQL?

How to write a query to create a conditional and calculated field in SQL? I am trying to merge two or more entities and the context of the entities are similar to the sample ones below. I am having ...
0
votes
2answers
22 views

List users that have most tokens

This is my tokens_log table. I want to list ten users that have most tokens. So result should be like this: *# Username sumOfTokens* #1 tolgay007 500 #2 hzrose 100 ... I tried ...
0
votes
1answer
10 views

Use pt-online-schema-change to add new column and populate it

I need to add a new column to existing MySQL table and populate with value calculated from another column. Is there a way to do this using pt-online-schema-change? Thanks
0
votes
1answer
16 views

Can't login with express+mysql, register works

I've tried various ways to make it work, but I can't get the login page to work, and the issue I believe is on the express side. //index.js const findUserByEmail = (email, cb) => { return ...
-2
votes
1answer
30 views

Need MySQL query results as array of JSONs, NOT array of arrays holding JSONs

I'm running MySQL 8 in a dev environment, learning as I go. I'm running a very simple PHP 7 RestAPI. Here is how I'm executing a simply MySQL lookup: $blockStmt = 'SELECT JSON_ARRAY(JSON_OBJECT("...
0
votes
0answers
10 views

pass MySqltransaction to connection object

I have Data Access Layer which work fine but for some usage I need to pass Transaction object to it. Sometimes I will use the transaction, but usually the operation should work fine without ...
0
votes
0answers
25 views

MySQL Query to remove zero columns

MySQL query to remove all the columns from a table having sum of amount equal to zero I have a table like this Date Col 1 Col 2 Col 3 Col 4 Col 5 1/1/15 0 0 1 0 0 1/2/...
0
votes
0answers
12 views

mysql - importing Tablespace: Lost connection during query

iam trying to recover innodb table which has 1.5M rows from ibd file ( 5.5 GB ) this is the exact steps i do: getting create table query using mysqlfrm command create the table discard tablespace ...
0
votes
1answer
13 views

Insert data when selecting a dropdown option, MySQL, JAVA, JSP

well my english is not so good, but i will try to explain me, I have a question about how to make an INSERT query when selecting an option from my dropdown, I explain myself, I have a section to ...
0
votes
1answer
28 views

MYSQL HAVING (not) with ROW_NUMBER() why it returns different row counts

I have simple query: SELECT definitions.rowid, chars, ROW_NUMBER() OVER (ORDER BY chars, definitions.rowid) AS nr FROM definitions INNER JOIN words ON definitions.word = words.rowid WHERE ...
0
votes
1answer
19 views

pass an item id to from card to modal

so i have a 3 cards that has its value taken from database i want to get the id of the particular card that was clicked and send it to modal so i can echo it in the modal i tried sending it to the ...
0
votes
1answer
21 views

Docker-compose container connection to MySql not working

I'm trying to dockerize an existing java app that uses MySQL database. The app is supposed to fill the database upon startup. However, when I try to run the app and the database in docker-compose, ...
0
votes
0answers
16 views

CMake Error at /usr/share/cmake-3.5/Modules/TestBigEndian.cmake:51 (message): no suitable type found

I am trying to install MySQL source code in Linux system and ended up with this error while executing cmake .. CMake Error at /usr/share/cmake-3.5/Modules/TestBigEndian.cmake:51 (message): no ...
0
votes
0answers
8 views

Create My sql trigger for After insert , update another table column using inserted record [duplicate]

CREATE TRIGGER latest_user_task_status_trigger AFTER INSERT ON user_task_transaction_table FOR EACH ROW BEGIN UPDATE user_task_table SET user_task_table.user_task_status=...
-1
votes
1answer
20 views

How to transmit insert data into database with existing data-members on webpage via button?

Background I have a database which has a table called menuitems. The menuitems store attributes of a menu of a resteraunt. The columns include "itemno, name, price, discount, category" The menu ...
0
votes
0answers
22 views

Everything after a Greek letter is empty in my database [duplicate]

I'm encountering what I'm sure is an encoding error but I can't seem to find the weak link in my logic. In particular, when trying to insert a Greek lambda into my database, the cell is blank after ...
0
votes
1answer
15 views

Multiple fields have the same columnName Android Room

I have 3 tables ruser, accounts, accountgroup. Each one has a same column called rsuerId. I created a POJO class with 3 Embedded objects as below. class GroupChatItem( @Embedded val rUserDto:...
-1
votes
0answers
30 views

Problem with the prepared statment sql query

Can someone please check the code for any error i may have. I have been trying to make this work for 1 hour now. When i click on the button(startkviz-btn) The "instruction" disappear and questions ...
-1
votes
0answers
18 views

Is there a generator or frontend for MYSQL databases for crud operations like in Microsoft Access? [on hold]

You know that good old Microsoft Access database: On Windows, you can create forms with subforms, views, etc. You can browse trough all the records using forms, edit data, etc. It is easy and ...
0
votes
1answer
20 views

MySQL - order by field, starting after specific value

I hope this is even possible. I got this table: I want to parse it by 5 rows each and ordered by score so when I do: SELECT * FROM test ORDER BY score ASC LIMIT 5 The result is: Now lets say ...
-4
votes
0answers
17 views

mysql retrieving data from the database

querie 1:Retrieve the names of customers who ordered at least one part that customer c002 ordered what i have tried select c.c_name from customers c,orders o where c.c_no=o.o_no and c.c002 &...
-2
votes
1answer
17 views

Filter specific data from table

Hi there hope someone can help me out, how can i filter multiple values from columns in this case pstatus 0 and 1 only? something like this: $result = mysqli_query($mysqli, "SELECT * FROM projecten ...
0
votes
1answer
24 views

PDOException : SQLSTATE[HY000] [2006] MySQL server has gone away

I am new to Laravel so started creating api. I already have MySQL database at local and I am trying to connect with local database but getting following logtrace. php artisan migrate ...
0
votes
0answers
6 views

MySql Replication over SSL tunnel

I have a bit of a unique situation, and I haven't been able to find any resources online addressing it, so here goes. I have a given server A (mysql id=1) and a remote mysql server B (mysql id = 2) ...