Questions tagged as 'mysql'

0
answers

Weird behavior of MySql

I am trying to make a query to the database so that I can list results close to the user (by latitude and longitude). I am currently using a query that is in the Google Maps documentation. The problem is when I try to limit to page (from 10 rows...
asked by 08.01.2017 / 17:39
1
answer

Problem with a model in Codeigniter3

I can not solve this error, I was reading it is a problem of lowercase and uppercase, I do not recognize the model codeigniter 3 Model Name: Model_Usuario.php Controller Name: User.php <?php defined('BASEPATH') OR exit('No direct scr...
asked by 08.01.2017 / 21:42
0
answers

How to obtain a MySQL image on Base 64 via Webservice?

Hello friends will see I want to get all the records of a table called CATEGORIES with the fields IDCATEGORIA, NOMBRECATEGORIA, IMAGENCATEGORIA through a Webservice echo in PHP and MYSQL and I show it in a JSON, the problem is that the Webservic...
asked by 20.12.2016 / 17:00
3
answers

Error importing database in Mysql?

This error gives me when importing a database from phpMyAdmin. The file is .sql (quite large, 8 MB) and I do import it but it shows me this error at the end of the import process. Anyone who can help me with this issue?     
asked by 22.12.2016 / 16:03
2
answers

mysql pivot table result of json fields

I'm looking for information to pivot a table in mysql. The bbdd that I have is a bit strange, because the data I have to get from a json of one of the fields. After searching, I managed to execute the following sentence: select...
asked by 05.12.2016 / 08:50
1
answer

Bring x record as first value Mysql

How can I bring the list of MySQL records and bring me in the first position x-id? That is, if I have a table with 5 records each with its id and I want to bring them all but in first position I bring the ID # 4 is it possible to do that? At...
asked by 30.11.2016 / 19:14
1
answer

Error adding values of a select in mysql

My code in MYSQL is: SELECT COALESCE(payments.base,0) as total, count(*) FROM 'payments' INNER JOIN 'pagos' ON 'pagos'.id = 'payments'.pago_id INNER JOIN 'documents' ON 'documents'.id = 'pagos'.document_id INNER JOIN 'clients' ON 'c...
asked by 04.01.2017 / 01:45
0
answers

What is the best way to index in Elasticsearch, through logstash or with PHP?

What is the best way in terms of performance (processor usage, memory, ease of use) of indexing documents in Elasticsearch, with logstash connecting via the jdbc driver to MySql or using a PHP script? Approximately a million ads are entering...
asked by 03.01.2017 / 20:48
0
answers

Problems executing a process where I use the loop: REPEAT

I have problems executing the following code: DELIMITER // CREATE PROCEDURE INFO_LINEAS() BEGIN DECLARE contador_fecha INT; DECLARE fecha_actual DATE; SET contador_fecha=(SELECT hml_aniomesinfo...
asked by 13.12.2016 / 19:49
1
answer

UPDATE with INNER JOIN in Mysql

I have this database schema for an electronic calendar. I have a table of events and one of equipment which is a many to many relationship. Once an event is deleted, I need to change the status of the equipment (eg, projector, notebook, point...
asked by 13.12.2016 / 13:49