Questions tagged as 'select'

1
answer

Create select for a table in PHP

I'm having trouble creating select for later use in a table. The required SQL tables are as follows: “Aluno” (**PK:** id, numero, nome), “Area” (**PK:** id, nome), “UC” (**PK:** id, nome, **FK:** id_area) “Classificacao” (...
asked by 10.12.2017 / 22:52
2
answers

I need to select a recipe and its ingredients without repeating the other recipe fields

I have the following scenario: Recipe Table --------------------- id name preparation mode category Ingredient Table -------------------------- id name Ingredient_receive table -------------------------------------- id i...
asked by 24.11.2017 / 17:28
1
answer

Undefined when passing parameter to a JS and Angular function

I have a function that takes as a parameter a value from HTML, however, it is coming undefined . I'm using JS and Angular. My HTML <div class="input-group col-lg-3 col-md-3 col-sm-3 col-xs-12 pull-left"> <select...
asked by 06.12.2017 / 00:12
1
answer

doubts with summation Mysql

I have the following tables Thetablecontamov,canhaveseveralcasualtiesofthesamerecordofthetablecrecpa.Ineedtoselectrecordsfromthecrecpatableandthesumofthelows(valuefield)ofeachrecord,Itriedwithasubselect,butwithoutsuccess,whatistherightwaytodoit...
asked by 13.01.2018 / 23:00
1
answer

Join the results of two SQL commands in H2

I created the following Query : SELECT s FROM SuprimentosPedidos s WHERE s.codigoModeloImpressora = :codigoModeloImpressora AND s.codigoEmpresa = :codigoEmpresa and s.prioridadeSaida = 1 ORDER BY s.prioridadeSaida, s.suprimento ASC u...
asked by 09.10.2017 / 13:31
1
answer

Why does not my query work?

I have a query in a table that should return the value of the number of records found that meet a given requirement. The code: <?php require('conn.php'); $prevJan= "SELECT COUNT(ID) AS PrevJan FROM participantes WHERE PREVIST...
asked by 14.09.2017 / 19:35
1
answer

How to allow the user to add a new option in a select?

I need to mount a select where the user can add new options, so I need the select to allow typing and a button next to it would call the function to include in the list. Home How can I do this? I have just the basic select with the link that sho...
asked by 14.09.2017 / 17:04
1
answer

Select command to delete duplicates, adding results [duplicate]

How do I change a table that looks like this: produto | quant a | 10 a | 5 b | 8 b | 3 And leave it like this: produto | quant a | 15 b | 11 Is there any comman...
asked by 16.08.2017 / 14:47
1
answer

Error when trying to list objects that are in the database when using Foreach ();

I am making this code to capture the elements of a table in my database but when I run the foreach code I get the error and I do not know what to do Data fetch function: function listaUniformes($conexao) { $uniformes = array(); $query = "...
asked by 25.07.2017 / 19:48
2
answers

Are there limits on the use of logical operators in the MySQL query?

Well, I would like to know if there are limits to the number of logical operators I can use in a MySQL query, for example: $sql = "SELECT * FROM usuarios WHERE nome = 'Fulano' OR email = '[email protected]' AND id <> '1'"; I would also...
asked by 24.06.2017 / 04:30