Questions tagged as 'sql'

1
answer

Can an INNER JOIN be done with a WHERE?

I get an error, it's a sure formulation error, but I can not find it SELECT * FROM comentariosforo WHERE ID_Post = '$IDPost' INNER JOIN usuarios ON usuarios.ID = comentariosforo.ID_Persona     
asked by 17.06.2018 / 14:39
1
answer

how to insert data in php array, mysqli?

I need to insert multiple records in a mysql table, from another table, but only the first record in the table is inserted my code is as follows if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } echo "Conectado a la ba...
asked by 11.06.2018 / 22:39
1
answer

How to take the variable with the oldest date - SQL SP

I have a stored procedure, which must take from a set of variables, the one that contains the oldest date in the field DATE_CREATION a product code is in different tables, I must take the data from the table with the oldest date and pass it t...
asked by 19.06.2018 / 17:33
1
answer

Put each row obtained in independent columns. MySQL

I make this query: SELECT idFormacion FROM alumnos_formacion And I get this: |idFormacion| ------------- 6 9 12 My question is whether a query can be made to put each row obtained in independent columns. |idFormacio...
asked by 11.06.2018 / 12:49
1
answer

Obtain an id using the count () and max () functions

I do not know what title to put to ask this question so all help to get this question resolved is welcome. Given the following tables: The result I want to get is the depto_no of the department with the most employees, that is:...
asked by 11.06.2018 / 21:18
1
answer

Is it possible to use SCOPE_IDENTITY in an update? Alternatives?

Use SCOPE_IDENTITY to recover the id of the insertion and thus be able to work with it. Therefore I know that with insert it works. The question is, does it work with the update ? I have tried to follow a similar process a...
asked by 07.06.2018 / 10:05
1
answer

Show image brought from a database in Android Studio

We want to show an image, previously saved in a database and shown in the android layout but we do not know how to do it. At the moment we have this: AccesoPHP aPHP = new AccesoPHP(); is = aPHP.ejecutar("http://"+IP+"/imagen.php");...
asked by 08.06.2018 / 18:04
2
answers

Query to get quarterly data

Very good, I have a query that is generated by making a selection by means of a <select> . In the <select> you have to choose the month and the year, and send the variables to a query where you extract the data for that...
asked by 08.06.2018 / 10:25
1
answer

Query all of a user's sales with totals

I am developing with PHP-PDO with MySQL and I have three tables: User (Seller) Sale Detail Sale How can I make a query in MySQL that shows me per user the detail of all the sales made (product, quantity, price, subtotal, *) plus the...
asked by 09.06.2018 / 03:37
1
answer

Erro in suds when consulting wsdl

I'm migrating some projects to python on sql 2017, and I ran into a problem about the suds library. EXEC sp_execute_external_script @language = N'Python', @script = N' from suds.client import Client url="https://graphical.weather.gov/xml/SOA...
asked by 27.05.2018 / 17:28