Posts by Marcos Santos • 197 points
9 posts
-
2
votes1
answer253
viewsA: Find position in an array by position in the array?
Friend, To get the position just split take the value subtract by 1 and divide by the number of rows or columns (if it is a perfect matrix) the position x will be the integer value of the division…
algorithmanswered Marcos Santos 197 -
2
votes2
answers123
viewsA: Query to return the first record with specific values
Friend there are two ways to do this. So SELECT * FROM users WHERE gender LIKE '%M%' ORDER BY id DESC LIMIT 1 union all SELECT * FROM users WHERE gender LIKE '%F%' ORDER BY id DESC LIMIT 1; Or so:…
sqlanswered Marcos Santos 197 -
0
votes2
answers27
viewsA: Get an item from each Row
There are two ways to do this: SELECT distinct TESTEROWS FROM COLUNA or SELECT TESTEROWS FROM COLUNA group by TESTEROWS
-
0
votes2
answers1099
viewsA: Reset page through reset button
Dude, First you need to put the buttons and fields in a form. Then you can inside the put function: event.preventDefault(); previne o comportamento de refresh da tela form.reset(); //limpa o form…
-
4
votes3
answers187
viewsA: Display record when another table has no reference
Gladison, let me get this straight: Do you want all the records of the table news that do not exist in fotos_noticias? If yes the select would be this: SELECT noticias.id, noticias.titulo,…
sqlanswered Marcos Santos 197 -
2
votes1
answer53
viewsA: Insert variable in script
Friend, in this second script is missing the goto after each sentence: Example: @echo off if %time:~0,8% LEQ 11:59:59 goto manha if %time:~0,8% LEQ 17:59:59 goto tarde if %time:~0,8% LEQ 23:59:59…
-
0
votes4
answers683
viewsA: Very slow SQL command
Buddy, good afternoon! Can you tell if these tables have a lot of records? If so, why Oce does not index these columns. Second point the like degrades a lot of performance use something like this:…
-
1
votes1
answer94
viewsA: Script with IF (time) less than
SET var= "Digite o usuário" IF %var%=="Carlos" Goto MSG :MSG Echo "Carlos usuario confirmado" pause And for the date test it: echo %time:~0,2% if %time:~0,2% LEQ 12 goto manha if %time:~0,2% LEQ 18…
ms-ofanswered Marcos Santos 197 -
1
votes3
answers13799
viewsA: Delete a particular repository from github
Go to the repository, Settings and delete the repository. See the tutorial: https://help.github.com/articles/deleting-a-repository/…