Questions tagged as 'query'

1
answer

Select limiting query, and does not display the last queries

In this script, it is limited to displaying 6 queries in SELECT in the variable $ amount_pg = 6, I used the IF to inform that all news situations other than 2 (unpublished) should be displayed. Home The detail is that in my SELECT, in order of c...
asked by 09.05.2017 / 21:18
2
answers

How to add 2 columns?

I have 2 subselects , SQL , which bring 2 different information with the sum of the data. How to do to sum the 2 " sums " and bring in a new column, or a single column? CASE WHEN sd3.D3_UM = 'PC' THEN (SELECT ISNULL(sum(sd3_...
asked by 06.04.2017 / 12:55
1
answer

Dynamic Select with query

I want to make a dynamic form like this: link I'm having difficulty linking mysql, php, and javascript to the following extent: -The first select the options values are generated by a query (Select * from Continent) - As selected Contine...
asked by 23.02.2017 / 18:23
1
answer

Advanced SQL Query with dates

I've had a problem for days. I have my table and need to count how many grades are late, so long. I just do not know how to do this query. I need to check if they are late, to be late it has to be with a difference of 3 days from the current dat...
asked by 17.01.2017 / 12:05
1
answer

How to use the Contains method in a search using the EntityFramework

I am trying to query sql , using EntityFramework : select * from pedidos where pedidoID not in (select pedidoID from agendamentos); I did some research and found that the EntityFramework method that replaces the not in of sql i...
asked by 22.02.2017 / 22:14
1
answer

Improving Login Logic - JDBC - JavaWeb

I'm developing the login method of an application, but I've been noticing that the query I'm running to check if a user is registered to the system and if his password hits the bank's data is very slow. I'm using Select * FROM cadastrados...
asked by 02.12.2016 / 03:27
1
answer

Searching for data from an ID in DB

I have researched here and google to see if it would solve my problem without having to ask a question, but I could not find any solution. What I'm trying to do is create a "related" but without it displaying the same post or video in case. I...
asked by 24.10.2016 / 13:19
1
answer

jQuery function stops working after Ajax search

I made a system in Codeigniter that does real-time search. In my search, I send the parameters via Ajax to the controller and I make the query. I put all HTML for a view. Then I get all the HTML of that view through ajax and feed my page repl...
asked by 19.11.2016 / 20:30
1
answer

SELECT with REGEXP

Next, I have a people table: [name, enrollment, cpf] What happens is, some people who have the "same" cpf have different license plates. The [same] is in quotation marks, because in the database, there are cpfs like in this example: 1)...
asked by 18.11.2016 / 02:44
1
answer

How to do a search in an app using AngularJS with parameter passing correctly?

How to do a search in an app using AngularJS with parameter passing correctly, when I speak correctly I mean to avoid SQL Injection. For example; the var parameters = "joao"; parameter in the query below. self.searchAll = function(na...
asked by 26.08.2016 / 20:18