Posts by carla • 632 points
14 posts
-
0
votes1
answer361
viewsA: Return JSON Infos in MYSQL in SELECT itself
You can do: SELECT catId, catEstrutura FROM categoria having (SELECT 1 FROM sistema_menu where menId=1 and json_contains(menEstrutura, concat('{"id" : ', catId, '}')))>0 That is, you search for…
-
4
votes2
answers130
viewsA: How do I Group Text in Mysql
I believe a sub-select can handle: select hora as horaH, tarefa, (select tarefa from tabela where data= DATE_ADD(CURDATE(), INTERVAL 1 DAY) and hora = horaH) from tabela where data = CURDATE() This…
-
1
votes1
answer23
viewsA: Sankey highchart - Skipping columns
Simply add ['Brazil', 'Germany', 2 ], doesn’t solve? (http://jsfiddle.net/morn2e4g/91/) A line was created from Brazil for Germany and the same continues in the third column.…
-
5
votes2
answers161
viewsA: How to insert the elements of the X array into an index of the Y array?
You must select the appropriate array (position 0 of the y array) to merge: $y[0] = array_merge($y[0],$x);
-
0
votes1
answer133
viewsA: Generate match keys between teams using a PHP array
If I understand correctly you want to define all the pranks without repetition between teams of groups different. This pairing can be achieved by having a loop run through all teams from the start…
-
5
votes1
answer377
viewsA: Foreach behavior with variables by reference
When you "equal" two variables, you can do this in two ways: By value: Indicating that at that point in the code the value of one is equal to that of the other: $a = $b; By reference: Indicating…
-
2
votes1
answer478
viewsA: Maximum size of a Mysql column
It’s like the Kaduamaral said, you can do this consultation: SELECT character_maximum_length FROM information_schema.columns WHERE table_name = 'nome_tabela'
-
3
votes1
answer1064
viewsA: effect :Hover and :active for image
Well, here’s an example of what I understood you want: Jsfiddle It was not clear to me the "other place" that it is necessary to click in order for the state Hover to come out, so I just made a…
-
2
votes1
answer1101
viewsA: Change image in javascript after click
To begin with, here’s a functional example of what you want: Jsfiddle Note that to reference the element itself you must use 'this': document.querySelector("#passo1").addEventListener('click',…
javascriptanswered carla 632 -
3
votes2
answers650
viewsA: How to point all pages of the site to one page?
You can use: RewriteEngine on RewriteRule ^(.*)$ /index.php [R=permanent,L] Source…
-
2
votes1
answer145
viewsA: Pie do Highchart
To make the rectangles in circles just add this in the parameter 'Legend' [Example]: symbolWidth: 12, symbolRadius: 6, And to group elements in the caption there is no way I consider elegant, but…
-
1
votes1
answer320
viewsA: Shopping Cart with Grouping by Seller
Let’s draw. Products table Table sellers $_SESSION['cart'] 0001=>2 0002=>5 0003=>4 First we generate the list of ids of products that were purchased: $itens_comprados = " "; foreach…
-
1
votes1
answer403
viewsA: Problem summing column values and displaying in highcharts
If I understand your request correctly, the most appropriate would be to count the number of items per day using SQL itself: $SQL1 = "SELECT sum(numitens) as numitens,data FROM highchart group by…
-
2
votes2
answers688
viewsA: How to insert caption with quantity
First of all, it is not plotOptions that is printing the contents of your chart, it is the "series:" parameter that is doing this. Second point, your code is a mess, if you had separated and…