Questions tagged as 'query'

0
answers

Relate 3 tables for java project

I have a question about mysql + java , I'm doing a project that I need to use 3 tables, and use methods to call data in common, but I do not know how to do them in a way in which the 3 are related to make the queries. Since I need a cu...
asked by 08.12.2017 / 21:06
1
answer

I have problems ordering from top to bottom my join with query builder

I have problems ordering the query from highest to lowest by the date "created_at" it does not throw error and if it shows me the data of the query but only it does not order them you are the code $listado = DB::table('lotes')->join('produc...
asked by 22.11.2017 / 20:30
2
answers

Mysql Update and insert in a single query

How can I write a Query to update certain fields where the only thing I want to check is the IDKey, but if it does not find the IDKey, the record does not exist, make an Insert of the record using this same information what I have: str="UPD...
asked by 28.10.2017 / 16:58
1
answer

Order consultation MongoDB

Right now I have the following MongoDB query through Mongoose: var g = new RegExp(search, 'i'); var query = { $or: [ {Tit: g}, {Resumen: g} ] }; Book.find(query).exec((err, books) => { if(err) { res.status(500).send({message: "...
asked by 26.10.2017 / 10:05
1
answer

Dynamic Columns - SQL Server 2012

I have two tables which I want using a Query SQL Server to generate dynamic columns depending on the number of records in a table. Please see the image.     
asked by 03.11.2017 / 03:34
0
answers

Which query is faster?

Good morning. I need to make an update to a table (table a) of 50000 records from a table (table b) of 200000 records where I look in table b for all the records that match table a. I have these two questions: UPDATE data_0_pagos a INNER...
asked by 26.10.2017 / 23:14
2
answers

Add value of a table related to itself

Hello I have a question about how to make a query in sql to add the total time it takes to produce the product. The diagram is a table of products that has sub-products, the design is an NN relationship with itself so I made an auxiliary tabl...
asked by 13.10.2017 / 14:04
1
answer

INSERT, DELETE AND UPDATE in Crud does not help me

Good morning I'm doing an exercise in which they ask me to make an ABM form and I did it in the following way this would be the file edit.php where is the update button that leads to another page to edit the data and then update them in the i...
asked by 16.10.2017 / 07:53
1
answer

MySql ExecuteReader does not bring results [C #]

good, I have the query, I am with a small project in C #, but I have the problem that a query that when executing it in mysql brings me the results correctly but when it is executed in my code, it recognizes me that it returns a row, but when I...
asked by 24.09.2017 / 01:54
1
answer

fatal error: uncaught error: can not use object of type mysqli_result as array

I have this problem when calling the function to dump the data I want. I have created a function to list some items according to their id: function list_item_by_id_controller(){ global $link, $gf_query; $id_types = array('eid','hid...
asked by 22.09.2017 / 19:05