Questions tagged as 'query'

2
answers

Doubt SELECT Mysql

In a given select I can reference two tables by foreign keys. Ex: IdA / IdB IdA = IdB Table A has a column named C Table B has three columns called D, E, F Both tables have similar contents for returns in SELECT Ex: Select ... fr...
asked by 19.09.2018 / 13:06
1
answer

How to convert sysdate to milliseconds in Oracle?

How do I convert sysdate to milisegundos directly into Oracle? I need to give the same result of the code below in java, but directly in query : String s=df.format(Calendar.getInstance()); java.util.Date parsedUtilDate = df.p...
asked by 23.02.2017 / 21:49
2
answers

Database not returning any value

I have the following code: $sql="SELECT * FROM imoveis WHERE (suite LIKE '%".$suites."%' OR banheiro LIKE '%".$banheiro."%' OR quarto LIKE '%".$quarto."%' OR garagem LIKE '%".$garagens."%')...
asked by 11.12.2018 / 00:00
1
answer

Index size of a mysql database

What would be the structure of a query to get the total size in MB of all index of the tables of a certain banco de dados in mysql ?     
asked by 03.11.2016 / 11:28
1
answer

Search inside another scaffold rails

I have a problem, an example I created two scaffold book and loan, then I created a controller and an index called report: rails generate controller RelatoriosEmprestimos index I want to make specific searches of scaffold loans on this cont...
asked by 12.06.2018 / 17:10
2
answers

PHP syntax error when inserting an image

I am inserting an image into the database with the following code $nome_img = $_FILES['imagem']['name']; if(move_uploaded_file($_FILES['imagem']['tmp_name'], "images/Produtos/".$nome_img){ $query= "INSERT INTO produtos(ImagemProduto) VALUE...
asked by 08.06.2018 / 13:02
1
answer

Get the data related to more than one table, separately?

I can not do this at all. It seems to be with the join, but when I try, it returns zero records. I have the tables: TB1, TB2, TB3, TB4, TB ... etc All with PK (ID) I tried this code: SELECT ID FROM TB1 inner join TB2 on (TB1.ID = TB2.ID)...
asked by 27.08.2018 / 15:43
1
answer

Linq to Entities - Count elements of a query that references two contexts

I have the following query: var query = (from q1 in query1 join q2 in query1 on q1.idGenerico equals q2.idGenerico into q2Left from q2 in q2Left.DefaultIfEmpty() join q3 in query3 on q2.idGenerico equals q3....
asked by 16.03.2018 / 19:17
2
answers

SQL Server Function - Holidays [closed]

Good afternoon! Dear, I have the following function below that is of the days not worked that is only coming Saturday and Sunday, however, I wanted this function to include the holidays. NOTE: I already have a holidays function, however, I wa...
asked by 12.09.2017 / 22:26
1
answer

help with get laravel

I need to get a parameter passed in the url. Ex: lugar.php?city=São Paulo . I need to get to São Paulo. I tried but it is not working, with the code below: $data['items'] = $results['query'] ->where('city',Reques...
asked by 03.04.2018 / 21:01