All Questions
660,816 questions
-2
votes
0
answers
44
views
Unable to update image name in MySQL database [closed]
I am trying to update an image in MySQL database but each time I do try to update, other fields (i.e. location) of the is updated but the image name becomes blank.
Below is the code for updating:
if (...
1
vote
1
answer
49
views
are Sub query operators ( ALL and ANY) really needed, why do we need them instead of min,max and in operator
we are using subquery operator ( ALL & ANY ) along with a relational operator,
so instead of that we can just use MIN or MAX in case of numbers and IN in case of characters.
I want to know if ...
1
vote
1
answer
46
views
Roll back a commit?
Note: This question focuses on web apps utilising MySQL's transactions - commit and rollback. Even though the code samples below use Python, the problem itself is not limited to the choice of ...
0
votes
0
answers
46
views
Are there any jOOQ conventions on how to batch-insert 1 to n relations to the database?
I regularly face the use case in our backend application that it needs to save a lot of data at once that is scattered around multiple tables, but mostly its a 1 to n relationship, or recursive data ...
1
vote
1
answer
64
views
How to apply spatial index in my situation without using 'or' and 'union all'
I've been refactoring using the spatial index at Haversine,
I wanted to write a sql statement that checks posts within 10km with the point value (0,90) for information without distance, but I ...
0
votes
0
answers
47
views
MySQL / phpMyAdmin: Merge Two Tables by Matching IP — Add numberoftime for Existing IPs, Insert New Rows for Unique IPs [duplicate]
I have 2 tables 'error1" and 'error2' with the very same architecture
error1
id
IP
numberoftime
1
127.127
56
2
100.100
47
error2
id
IP
numberoftime
1
90.90
56
2
100.100
32
I would like to merge '...
0
votes
1
answer
40
views
How can I list all records for a joined table but filter by it at the same time?
Let's say I have the following structure:
Courses
ID
name
1
Math
2
History
Students
ID
name
CourseID
1
Bob
1
2
Alice
1
I want to make a query which lists all the students in a course, but filter ...
-1
votes
0
answers
25
views
SQLSTATE[HY000] [2002] Connection refused PDO with docker [duplicate]
I have a small docker project running, which contains an nginx server, 2 database servers ( one local, one for tests). It generates a webpage, which I access via http://localhost:8012/ 8012 being my ...
-4
votes
0
answers
44
views
Why is LEFT JOIN skipping identical VARCHAR barcode values in SQL Workbench? [closed]
I have two tables in SQL Workbench, both
sales
Barcode(primary key for each sale)
other sales-related columns…
products
Barcode
product_name, price, etc.
I'm running a simple LEFT JOIN to append ...
0
votes
1
answer
55
views
ERROR 1064 (42000) at line 1: '=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci' at line 1
$ mysql -u user -pPassword db_name -e "ALTER TABLE `table_name` ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ;"
Error: failed_jobs: command not found
mysql: [Warning] ...
1
vote
2
answers
103
views
SQL to join tables and get value from one table that has most recent date closest to date of parent record
I have two tables, one a parent of the other, let's call them CUST and CUST_ADDR. Each table is a history table, so each time a value in one of the data fields changes, another record is added with ...
-1
votes
1
answer
57
views
MySQL LEFT JOIN with ORDER BY on large table is slow despite index usage
I'm facing a performance issue in MySQL when using a LEFT JOIN combined with ORDER BY on a joined column.
Schema (Simplified)
-- organization: ~6,000 rows
CREATE TABLE organization (
id INT PRIMARY ...
0
votes
0
answers
25
views
Sort MySQL Results into zone columns [duplicate]
I have a MYSQL (very early release) query which returns the current location of assets (by querying three tables, zonenames, asset names and logs (logs shows the last know location timestamp of the ...
0
votes
0
answers
27
views
MySQL 8 Cluster : Hibernate transaction: Unable to commit against JDBC Connection; Plugin instructed the server to rollback the current transaction
I use Java Spring 3 and JPA Repository to interact with MySQL 8 Cluster.
You can follow my code:
Transfer transfer = new Transfer();
transfer.setField...;
transferRepository.save(transfer);
transfer....
1
vote
1
answer
72
views
stored procedure updates zero rows
I am creating a stored procedure that in theory should update roughly 13K items in my database. I am creating this on my own personal machine, thus the localhost and root username.
In theory it should ...