Questions tagged as 'sql'

1
answer

Arranged stored procedure with bifurcations in sql server 2000

I'm complicated when it comes to putting together a stored procedure. The query is hardcodeed in php in this way: if(trim($id) != ''){ $query = "select * from PACIENTES where idpac in (select pac_id from contacto where id = ".$id.") ";...
asked by 10.08.2017 / 19:31
0
answers

Make a SQL query that varies on a table in Python

I want to write the result of several SQL queries that are dependent on a table res[ids] . for i, ids in enumerate(self.res['ids']): print ids cur.execute("""--- hashtag describiendo los grupos de subscrib...
asked by 04.08.2017 / 15:03
0
answers

Instructions prepared with PDO do not prevent SQL Inyection

I have an application in PHP 5.3.29 and MySQL 5.6.35 which used SQLQUERY to execute the instructions SQL , I changed them using PDO and prepared instructions. The problem is that I analyze the application usi...
asked by 09.08.2017 / 20:17
1
answer

Error executing two procedures in Codeigniter

The problem is that in a controller I try to execute the two procedures I skip this error:    A Database Occurred Error       Error Number: 2014       Commands out of sync: you can not run this command now       CALL charges ();       F...
asked by 10.08.2017 / 02:21
1
answer

Generate fixed tuples for each tuple of a result

I have 3 tables: areas , roles and personas . I generate a hierarchy based on them where personas hang from their role, each role hangs from its area , and all areas of a fixed tuple. The basic query that I leave...
asked by 17.08.2017 / 20:09
1
answer

Group by date + Dynamic time

I have the following structure: name fecha valor b1 12/07/2017 19:45 200 b1 12/07/2017 19:50 220 b1 12/07/2017 19:55 221 ... b1 13/07/2017 00:59 425 It is a table where records are kept every 5 min...
asked by 17.08.2017 / 18:14
0
answers

Convert SQL Native to JPQL

I have this query select distinct p.nombre, p.total, p.clie_id from(select cli.nombre as nombre, cli.clie_id, cue.cuen_id as cuenta, count(cue.clie_id) over(partition by cli.clie_id) as total...
asked by 06.08.2017 / 19:59
1
answer

Download .sql file to Postgres heroku

I am implementing a larvel project, this already has a populated database. Now I need to deploy this project in Heroku but I can not make the migration from my .sql file to postgres Heroku. I have tried with the documentation but the single inst...
asked by 26.07.2017 / 16:56
1
answer

JasperReports Print repeated values when doing INNER JOIN Double

This is my inquiry code SELECT FACTURA."ID" AS FACTURA_ID, FACTURA."CLIENTEID" AS FACTURA_CLIENTEID, FACTURA."USUARIOID" AS FACTURA_USUARIOID, FACTURA."FECHA" AS FACTURA_FECHA, FACTURA."TOTAL" AS FACTURA_TOTAL,...
asked by 24.07.2017 / 19:59
1
answer

Problem uploading file to bbdd with sql

I can not get this code to work for uploading the file to the bbdd. If it is saved in the directory but not in the bbdd. Code: <?php $nombre_archivo = $_FILES['archivo'] ['name']; $tipo_archivo = $_FILES['archivo'] ['...
asked by 24.07.2017 / 10:32