Questions tagged as 'mysql'

1
answer

Database query php and mysql PDO

Someone who can help me ..... I want to print the userid, as I already have in the html, it's just an echo "$ result" .... <?php session_start(); include "conexion.php"; $user = $_SESSION['usuario']; $idusuario="SELECT id_usuario FROM u...
asked by 05.12.2017 / 05:47
1
answer

Database (My SQL), SQL commands

Basically, through which command, I could calculate the party that gets the most votes, I know that we have to use the Count and MAX command, but when using it at the same time it gives me an error. I leave the command you make and I get an erro...
asked by 24.11.2017 / 21:57
2
answers

How to read a JSON response from AJAX?

How about? You see, I'm learning ajax and json; while I was doing some tests, I have a question that I have not been able to clarify and I would like you to help me. I explain: I have a code where I make an ajax request to get certain informa...
asked by 26.04.2018 / 23:57
1
answer

Error inserting records in two different tables from the same model

I want to insert records in 2 different tables from the same model. When I give it to save, it marks me:    Call to a member function bind_param () on boolean <?php error_reporting(E_ALL); require_once 'conexion.php'; $obj = json_decode...
asked by 19.01.2018 / 07:24
1
answer

Using ";" in a query that is in php

I have this query: SET @runtot:=0; SELECT Fecha, (@runtot := @runtot + Numero) AS 'N' FROM Tabla WHERE 'ID' = 2 I am using this query on a page of php . But since there is a ; in the query (at the end of SET @runtot:=0; ), the...
asked by 07.01.2016 / 19:29
1
answer

MySQL REST API Error

Good morning, I have designed an API Rest in NodeJS. It works correctly, but when I left it up for more than 24 hours it gives me a connection error in MySQL DB. events.js:160 throw er; // Unhandled 'error' event ^ Error: Co...
asked by 07.11.2017 / 09:44
1
answer

Incorrect datetime value in MySQL

I was trying to register using a query in c # the datetime.now in a MySQL database What I do in c # is: cmd.CommandText = "INSERT INTO cola_llamadas(fecha,queueName,cola)" + "VALUES(DATE_FORMAT('"+DateTime.Now+"', '...
asked by 24.10.2017 / 16:48
1
answer

Upload multiple images to the server with PHP

I have a fragment of code that makes the upload of files, in this case images to the server and then saves the record in the database [MySQL], the operation works but sometimes I find it slow when trying to upload 2 or 3 images, which seems stra...
asked by 19.10.2017 / 16:21
1
answer

Problem in condition query SQL MYSQL

Good mates I have a problem with an SQL query in MYSQL, I explain to you how are the tables, I have a table of Events that basically are birthdays, they have among other things a start time and a Finally, I have another table of Materials th...
asked by 30.12.2017 / 00:55
1
answer

Progress Bar Dynamic Bootstrap MySQL

Good day forum, a help to generate a ProgressBar Dinámico with data extracted from a query mysql . Progress Bar <?php foreach($clientes as $cliente): $id = $cliente->identificador;...
asked by 22.12.2017 / 19:21