Questions tagged as 'mysql'

5
answers

problem with LEFT JOIN

With this function I show a list of exercises belonging to a course that come from a table called "lessons" with the following important columns: lessons.id, lessons.number, lessons.course_id entre otras. all users see the same user_id is...
asked by 13.08.2018 / 21:31
2
answers

Passing data from a table in HTML to an insert in Mysql with PHP

I hope you can help me. What happens is that I have a table in HTML that I am generating with javascript, but the result that it gives me, I must save it in a table that I have in my BD HTML Table: I already tried going through th...
asked by 14.08.2018 / 22:13
2
answers

MySQL error: # 1690 - BIGINT UNSIGNED value is out of range in

After making the following query: SELECT CP.code FROM cart_products AS CP INNER JOIN products AS P ON P.code = CP.code WHERE CP.cartID = 22207 AND (P.stock - CP.quantity) > 0 I got the following error:    # 1690 - BIGI...
asked by 29.12.2017 / 21:33
2
answers

Problems with max use after count

Dear, I have this query SELECT p.id_pregunta, tr.tipo, COUNT(r.id_respuesta) as cantidad_respuestas FROM encuesta e LEFT JOIN dimension d on e.id_encuesta = d.id_encuesta_p LEFT JOIN preguntas p on d.id_dim...
asked by 29.12.2017 / 07:10
2
answers

Error inserting data with PDO and POO

Greetings community. I am developing an application using PDO, I am starting and I have had a problem when inserting records in the database. Next I put the functions that I am using and the error that is giving me. First my controller receiv...
asked by 31.12.2017 / 02:03
1
answer

Problem with current time in PHP and MySQL

Since I have several date columns in the table and I can not use more than one column CURRENT_TIMESTAMP , through a function that I created I get the current date. The function is as follows: function dame_fecha_actual() { $hoy = get...
asked by 06.07.2017 / 05:40
2
answers

Candidates whose average is below the general average

I want to complete this SQL statement, so that I only return the candidates whose average is lower than the general average: SELECT Candidato, COUNT(Candidato) AS num_votos FROM votos GROUP BY Candidato The structure of the table is: CREA...
asked by 03.07.2017 / 07:53
3
answers

Laravel 5.4 localhost: 8000 does not work

At the moment of putting php artisan serve everything is fine, until I address my localhost:8000 and it shows me the following: Warning: require_once(C:\xampp\htdocs\EEPAT/public/index.php): failed to open stream: No such file o...
asked by 04.07.2017 / 23:49
2
answers

Create PHP color search

I want to make the users of my application able to search for images by color. I have a table of images that stores the colors in hexadecimal as a string type. +----+-----------------+---------------+ | id | name | color | +...
asked by 08.03.2017 / 21:12
2
answers

How to validate a switch and insert it into the database if the data in my db is Boolean?

I have a form to which I enter the data of the staff, but to give it a more elegant appearance in view of the user I have inserted a switch component to 'validate' if that 'character' will be active or inactive, which will be saved as true or fa...
asked by 03.03.2017 / 23:01