Questions tagged as 'mysql'

1
answer

missing 1 required positional argument - python

I am practicing with classes, objects and databases. I can not make this code work and I'm not sure what I'm doing wrong. I receive TypeError: nuevo_articulo() missing 1 required positional argument: 'precio' Here is my code: import mysql...
asked by 16.12.2018 / 20:27
3
answers

The server closes me connection with the mysql server

Good, I have an application made in java and mysql, after hours the connection is closed, I understand that by the global variable of the server mysql wait-timeout. I have a class that creates the connection to the BBDD and then a class "mana...
asked by 03.09.2016 / 12:38
1
answer

SUM and COUNT of existing records or not in related tables

I have 3 tables. The first one is called Months and it is conformed in the following way: The second table is called orders and is formed as follows: Where the fields in the red box are the ones that matter. The third table is...
asked by 09.12.2018 / 04:30
3
answers

Does not show the data of my MySQL table

I want to show in my php file taking from my MySQL database the ClientCode and CustomerName of my table Customers of my Database 'gardening', this is the code I have but nothing is shown to me in the browser. The connection to the database works...
asked by 04.12.2018 / 23:21
1
answer

php records are not saved

I have to save what I write in an input text in a table in a database, I do not save anything, I do not know what problem I have, I'm new to this. they are made in a stored procedure and I only execute it with a query. <?php include_once '....
asked by 04.12.2018 / 13:15
1
answer

Create a new column in SQL table

I have a problem and I hope someone can help me .. I have an SQL table with these columns: What I need is to create a "Total" column that is unitPrice * amount, but I have tried several alter tables and they have not worked for me....
asked by 04.12.2018 / 23:39
1
answer

Save orders in database

I have a cart and I am working on the button to confirm the purchase. The products arrive to the cart by means of a while, and I keep the data I need from each article in variables. The problem is that when doing the submit only print the values...
asked by 02.12.2018 / 16:10
2
answers

GROUP BY with null values

SELECT s.producto,s.entrada AS entrada,r.salida AS salida,s.mes,s.anio AS anio,s.entrada-r.salida AS total FROM (SELECT MONTH ( fecha ) AS mes,YEAR(fecha) AS anio, producto,COALESCE(SUM(cantidad),0) AS entrada FROM eProductoTerminado WHERE...
asked by 24.08.2016 / 20:38
1
answer

Upload only videos to the server with Php and Mysql

Currently I want to upload only videos to the server validating from php: This is what I currently carry: <?php session_start(); require'funcs/conexion.php'; if(!isset($_SESSION["id_usuario"])){ header("Location: index.php"); } ?>...
asked by 13.12.2018 / 22:00
1
answer

SQL query that as a result the questions have been answered 4 times in a row

I wanted to get a query to return the "question number" according to the following parameters: That it meets: -What idUser = 1 -What mode? Questions? Operator of Services - That the last 4 times that has been answered has had as a value the a...
asked by 09.12.2018 / 19:30