Questions tagged as 'mysql'

3
answers

Sort by dates GROUP BY

Good afternoon. I'm trying to sort a grouped result and I want to get the last move made by a client with a given ID. The idea is to group by ID and show only the last query of each client (ID). Doing a test with 6 records of the same cli...
asked by 08.09.2017 / 12:39
1
answer

Go from Milliseconds to Java Server Faces Hours?

Good day for the next query, I have a Long variable to which I assign the subtraction of two Datetime, The variable difference stores me the result in Milliseconds but I need them in hours to save them in my column of type Float and not save me...
asked by 08.09.2017 / 15:32
1
answer

Help to build a mySql query with PHP

I've been trying to find the error of this PHP script for a week. What it does is to construct an 'INSERT' query taking into account the fields filled in by the user in a form. The error it throws is this:    Error at line: 470       Error m...
asked by 13.09.2017 / 10:12
2
answers

Performance of my website

Good community, In this way I use the sessions in the main file to differentiate the interfaces of a common user to an administrator, for example: <?php session_start(); if (isset($_SESSION['usuario'])) { if ($_SESSION['usuario...
asked by 19.09.2017 / 16:34
1
answer

Make fields of different tables appear in forms and queries

What I would like to do to help you understand better is the following: I have a client table with the following fields: IdCliente int not null primary key auto_increment; Nombre varcjar; Apellido varchar; Direccion varchar; Telefono varcha...
asked by 16.10.2017 / 02:13
1
answer

Error with foreach and cartesian product

I have this code: $CArticulos = Consulta_Dinamica("Array","*","Articulos","'borrado' != 1 ORDER BY 'id' DESC"); if ($CArticulos) { //si existen Datos en la base de datos foreach($CArticulos as $DArticulos) { if (isset($DArticulos['talla'...
asked by 15.10.2017 / 20:49
1
answer

Undefined when entering the value in the DB [closed]

It connects me perfectly all the values but when entering a part that is called incidence appears to me write what you write me appears undefined this is the code where data is entered into the DB require_once ("../con...
asked by 28.09.2017 / 20:16
1
answer

download of imagenen that is in the DB

as I do to download and to show on screen a previously loaded image to the database This is the php that seeks to load the image I do with the variable but the only thing that loads is the name of the image <?php...
asked by 28.09.2017 / 22:39
2
answers

Text ordering

In a form I have a textarea at the time of entering data the income of the following form. But when I call it from the database it pulls me like a line Is there any way to get it sorted out as you entered it at the beginning? I'm usi...
asked by 28.09.2017 / 16:29
2
answers

last 2 months Different

I have a registration list for each SKU; then for each SKU I would like to be able to obtain the prices of the last 2 months Different (Months registered) (and that I can recognize between annual changes like December 2016 and January 2017) th...
asked by 23.10.2017 / 17:33