Questions tagged as 'sql'

1
answer

Map tables to save access history

I have an application, which I need to save at least once a day, the date and time that the user accessed the application / system. Because we charge at the end of the month for the number of days that the app / software used. What is the bes...
asked by 30.07.2017 / 18:16
0
answers

SQL needs CAST to return values in query

Gentlemen, I manage a PHP application that uses SQL Server 2008 database. After a database server migration queries only work by doing the conversion with CAST and selecting one by one in SELECT . I do not use CAST I get this error....
asked by 21.07.2017 / 17:24
0
answers

SQL Server Connection

I'm trying to connect directly to SQL Server for testing, but at the time of the "Register" test by clicking the button, the app simply hangs, is there something wrong with the code? package br.com.agemstar.testesql; import android.os.StrictMo...
asked by 24.07.2017 / 21:47
0
answers

Saving file on the server

Good afternoon, I'm trying to send a file with php to the server, but it's not going to the given folder and it's getting "loose" in the main folder. Andbesides,insteadofthefilegoingtotheselectedfolder,itisgettingthenameofthepath.Example:Li...
asked by 24.07.2017 / 18:38
1
answer

Group employees by company in query

I'm making a report, where I need to follow the following layout: Withthequerybelow,youhavecreatedmorerows,ratherthangroupingemployeesbycompany:selecte.cnpjascnpj,e.nome_completoasempresa,li.codassolicitacao,''funcionariosfromliberacoesli,em...
asked by 15.07.2017 / 19:22
0
answers

Best way to store Varchar (MAX)

I'm working on an EAD project where I work. They will be simulated with many questions and their answers. These questions and some answers are usually quite large and I'm storing them as VARCHAR (MAX) on a SQL Server database. The question...
asked by 14.07.2017 / 15:10
0
answers

In which table does wordpress store the posts layout?

I need to update old posts with a new layout, I wanted to know in which wordpress database table is the layout of the posts someone has idea ?, obs have to change without being by the panel of adm, It has to be by the bank.     
asked by 14.07.2017 / 15:17
1
answer

My SQL always adds 24 clicks to each access instead of 1

I have a script that counts the visits on my web pages and stores mysql, however, it is adding 24 clicks to each access, instead of 1 . What's wrong with this code? See the script: <?php $idcategoria = 19; if (!empty...
asked by 25.07.2017 / 19:45
1
answer

Perform trigger condition

I have a trigger that does an update on my table. I would like to know how to do so that the trigger is only executed if the status column is different from what is already in my table, if it does not, nothing happens. DELIMITER $$ CREATE TRIG...
asked by 13.07.2017 / 20:22
1
answer

Incremental ordering of columns, but per result line

I have the following table structure and results: Ineedtocreateanefficientstatementthatcansortvaluesinascendingorder,buttheyshouldbesortedbycolumn/rowandnotjustbycolumn.Intheexampleabove,theexpectedresultwouldbe: Thanks in advance for y...
asked by 25.07.2017 / 16:15