Questions tagged as 'query'

1
answer

PHP and Javascript - Tuning MySQL table lookup (Doctrine Query)

I'm doing on my page of my client, which I assumed from another developer, a section to search for events registered in the MySQL database. How is this page: <div id="detalhesBusca" class="textDescricaoSobre font13" style="display: none">...
asked by 08.06.2016 / 21:00
2
answers

Dynamic data record in 2 tables

Good afternoon guys. I have the following situation: In a vehicle registration module, it is necessary to dynamically register a vehicle in a single vehicle followed by all its models and group, being that a vehicle can have N models and b...
asked by 19.05.2016 / 18:23
0
answers

SQL Query for Message System

I am modeling a base for exchanging messages between users, and I have the following tables, user , user_friend and user_friend_message . The user table stores all users of the system, user_friend makes the frien...
asked by 10.04.2016 / 06:32
2
answers

Error in Insert ... Values using oracle error 00936

I'm trying to make an insert into a table and it always gives me the error 00936 that says missing expression when it arrives at the cmd.executenonquery command line. Can someone help me? Code that I have: using (OracleConnection conn = new...
asked by 26.04.2016 / 19:08
0
answers

List with WHILE a QUERY with 2 Joins

I'm trying to make a report by joining 3 tables. But the table is not being generated. The query works in PHPMYADMIN, but not in php. Database running Query PHPcode$sql="SELECT fp_marca.marca as MarcaF, fp_modelo.modelo as ModeloF,...
asked by 14.04.2016 / 01:10
1
answer

Combobox + Arraylist + SQL

Hello, I have the following problem in question: I made an array list to list data in a combo box, but it only lists the data in the first table, in the case: "catdesc", which is the description of a car category, whether it is Sports, etc. B...
asked by 19.04.2016 / 03:35
1
answer

Doubt SQL Beginner

I need to know what the following queries accomplish, however I'm in doubt, as I'm starting to study SQL now. Can you help me? "SELECT user_id, CAST(SUM(points_per_badge) AS INT) " + "FROM (SELECT p.user_id AS user_id, (COUNT(1) * b.qu...
asked by 13.03.2016 / 00:40
0
answers

How to insert default values in the table along with a variable value?

Scenery: I have a database with 2 tables, table A has the screens of an app, and screen B registers the activity on each screen, thus: ____________________ | Tabela A | ------------------- | id | tela | | 0 | p...
asked by 05.02.2016 / 03:29
1
answer

SQL query according to Column make a new one

I have a column that is numeric. There are positive and negative values in this column. I need to make a query that when it is positive, I query Tabela A , when it is negative I refer to Tabela B . I have no idea how to do this, can...
asked by 11.12.2015 / 14:40
1
answer

Group function does not work

I have two tables. Table: Pedido Columns: IDPEDIDO , CLIENTE , DT_PEDIDO , FORMA_PGMT , CLIENTE_ID . Table: Itens_Pedido Columns: PEDIDO_ID , QT_MERCADORIAS , MERCADORI...
asked by 05.12.2015 / 20:22