All Questions
8,116
questions
0
votes
0
answers
17
views
How to create a new table containing all unique strings extracted from JSON arrays in the column of another table. SQL
I have table describing music and column genres contains values like ["genre1", "genre2","genre3",..] (multiple genres can belong to one song).
I need to create table ...
0
votes
0
answers
21
views
Create mysql table from json string when 1st dimension hold columns and 2nd dimension holds rows
I am sitting with a legacy database and im trying to create this table in mysql using json strings stored in the database.
I have a table that stores a massive json string and one of the keys inside ...
-1
votes
0
answers
54
views
OCSInventory Agent inserts an array in MySQL database instead of the string it should do
I have my agent working on my client machine which gathers listening ports and put them to a string this way :
my $portsTemp = `lsof -P -p $pid | grep LISTEN | grep -v localhost | cut -d&...
0
votes
0
answers
26
views
MYSQL Where IN not working if the parameter is taken/converted from json string [duplicate]
I have a table something like this
id
name
1
A
2
B
3
C
I'm trying to filter it by using WHERE IN from a json string with something like this:
SELECT id, name FROM ref_finding_criterias WHERE id ...
1
vote
1
answer
23
views
MySQL when to get the sum of multiple fields created using COUNT CASE WHEN function? Inside of same query or after with PHP?
I have a mysql query that Selects data and returns the total of multiple fields using the COUNT(CASE WHEN) function. What I would like to accomplish now is get the some of all those fields in order to ...
0
votes
0
answers
37
views
Using JSON_TABLE to save an unorder ARRAY
I have the next array, I need to save in a json_table, the problem They are shown in different order for each employee For that reason I can't store using:
Depto varchar(100) path '$.plaza....
0
votes
1
answer
46
views
Whenever I submit a user update form in my dashboard, my error array returns a flag for unchanged values
Currently working on a project that requires me to build an admin area for an admin to manage users and permissions.
I'm using an array to return errors to admins if they submit duplicate data to ...
0
votes
1
answer
187
views
Extract JSON array values with generic keys to JSON_TABLE in uniform columns
I have JSON that is being brought into MariaDB/MYSQL database via Airbyte from a API query. I am using JSON_TABLE to break the JSON into columns - which is mostly working great, but I just noticed ...
0
votes
1
answer
61
views
To get partial array values in MySql json type
When [1,2,3,4,5] is stored in Json Type in MySql with column 'jscol' and table 'Jtest',
How to get partial values above 2? I couldn't find the right query.
I think some combination of json functions ...
0
votes
1
answer
100
views
PHP: Re-sorting Display Order with Selected Rows and Inputted Starting Point Value
Just attended a concluding interview where the interviewer assigned me a task involving CRUD operations. The task specifically entails displaying data sorted by the "display_order" column. ...
0
votes
2
answers
143
views
How can I parse through an array in PHP and treat each element as a string? [duplicate]
I am working on a project where I need to turn an array of strings into an SQL query. In order to do so, I am attempting to parse through the array and place each element in a string to be sent to ...
0
votes
0
answers
16
views
How to get SUM of a column in below mysql table if I want to filter it by a product id, which is in a object array?
I have a MySQL database and there I have an orders table as in below.
In here prc = product count, prid = product id and prcat = product category.
I want to get the sum of subtotal, where product id (...
0
votes
2
answers
49
views
How to create JSON column with parent and multiple childs and grandchilds
I am new to MySQL and can't find the right answer so im hoping you guys can help me out.
I have 3 tables.
Applications (columns: appli_num (PK), appli_title)
Modules (columns: appli_num (PK), ...
1
vote
1
answer
268
views
MySQL, JSON_CONTAINS usage on array
How to use 'JSON_CONTAINS' by such structure in MySQL JSON field?
[{"uuid": "a07b50ca-42f0-4d2b-b0a2-f2980deb03d8"}]
Doing this way:
SELECT * from tables c where
JSON_CONTAINS(...
0
votes
0
answers
31
views
Can't search a value in a simple json array [duplicate]
I have a json column in my table that looks like this :
+-------------------------------+
| referrals |
+-------------------------------+
| [123,456,789] |
+------...