Questions tagged as 'mysql'

1
answer

Find two matches in a field

I have a table with two fields and I want to draw the matches in another field from another table. One field is the beginning and the other the end of the same field. Table1 CampoA can end or not with _ CampoB a...
asked by 18.06.2018 / 13:26
2
answers

MYSQL- orientation about an inner join

I have a table (bd mysql) where I store several IDs (foreign keys) and now I need to show the data linked to those IDs according to a specific value, which is an identifier. For example, I should get something like this: 001|identificada|so...
asked by 20.04.2018 / 16:48
1
answer

Inner Join in Codeigniter

I'm trying to show the name of a provider, as well as the name of the garden instead of its id from the table entries. The problem is that I do not know how the syntax is in Codeigniter to bring and show that data. Model: pu...
asked by 10.04.2018 / 23:35
1
answer

Optimize Mysql InnoDB tables

I have a MySQL database of almost 15 GB with many tables, some of them gigantic. I wanted to do the optimization task but being INNODB is not possible. From what I have been told this database has been running since 2000 and has nev...
asked by 12.04.2018 / 06:21
1
answer

Insert in a table only when the registration does not exist

I have a table in MySql and in it I want to enter data from another table located in a different database, the data is inserted correctly if I execute the following query: INSERT INTO courses_members (course_id, user_id, added, validity, a...
asked by 28.03.2018 / 17:47
2
answers

Query COUNT (*) returning values without counting as zero

I have a table where I have responsibility for incidents. I want to remove all those responsible with all the incidents of each one, but also those who do not have. Table: RESPONSABLES TIPO Example with query results (I want responsible wi...
asked by 16.04.2018 / 13:24
1
answer

Join duplicate rows in mysql

I need to create a query prepared now I use select restante,cajas,calidad, count(*) as total from separacion_detalles group by calidad I do not know much about sql, in the calidad column I need to make inner join to the...
asked by 16.04.2018 / 18:54
2
answers

PHP - error Recoverable fatal error

hello everyone I'm wanting to filter a calendar by the user who started session, but this error is marking me Recoverable fatal error: Object of class mysqli_result could not be converted to string on line 34 This is the form that retri...
asked by 16.04.2018 / 17:31
1
answer

Excepcion primary key in php and mysql

I'm inserting data from a txt in a base and it turns out that a field that is the primary key is sometimes repeated, I need to generate a "report" that at the time that file is uploaded, it notifies that primary keys were repeated to the user Is...
asked by 09.04.2018 / 05:26
3
answers

I can not connect mysql to my Django project

In my settings.py file I put the following: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'djangoproject', 'USER': 'root', 'PASSWORD': '', 'HOST': 'localhost', 'POR...
asked by 09.04.2018 / 01:57