Questions tagged as 'mysql'

2
answers

Primary key composite not self incremental or simple primary key not auto incremental in MySQL?

I have a table with the following structure: CAMPO TIPO NULL KEY DEAFULT EXTRA id_laudes int(11) NO PRI NULL auto_increment id_liturgia int(11)...
asked by 09.09.2017 / 04:30
1
answer

How to migrate a SQLServer 2012 database to MySQL?

I need to perform the migration of a SQLServer 2012 Database to MySQL for this I tried the information in this post: link But it only works for SQLServer 2008. Then I tried OpenDBCopy link Then try to do what is indicated in t...
asked by 21.07.2017 / 02:32
3
answers

How to search for 2 fields in PHP?

I am trying to perform a search for 2 fields, both are in the same table, I want to look for a data captured in the bd either by the name of the team that is what is captured or by the date when it was captured. For now I can only search for...
asked by 08.08.2017 / 19:10
2
answers

Error # 1064 when creating a stored procedure

Good attempt to make a kardex and the process of movements I want to do with a stored procedure. This is the Relational Model of the database: Where product_cod of the kardex table is the product_id of the product table and the concept...
asked by 22.06.2017 / 21:49
2
answers

Group results with current date

Example, I have a query mysql like this SELECT * FROM post WHERE fecha >= $time; where $time = current week I also have a array with the days, which are grouped $days = array('Lunes', 'Martes', 'Miercoles',...
asked by 26.06.2017 / 16:14
1
answer

Get the result of a query and through that result make a like to another table

Good morning. I need to mix both queries in one SELECT nombre_categoria from tablacategorias where id_categoria=1; select * from videos A where A.categorias; What I try is: In the "tablacategorias" I want you to return the name of the categ...
asked by 31.07.2017 / 10:31
2
answers

Query database with count (*)

I have a table called exam and another call questions. These tables are related to the idexamen. My query is to show the name exam and the questions it contains: SELECT examen.idexamen,examen.detalles,count(*) from examen,modulo where ex...
asked by 16.05.2017 / 10:01
2
answers

Show message when the database was not updated

I have a form that updates a record in a database. (Works correctly). The problem is that when the condition where is not met, it shows correct update, although it is not updated. How do I do it so that when it does not update, it tell...
asked by 21.06.2017 / 22:58
1
answer

Query works in PHPMyAdmin but not in the PHP script

The query: SELECT 'morel_asigntura'.'asignatura', 'morel_asignaturas_ei'.'nombre_ei', 'morel_asignaturas_ei'.'activo_ei', (CASE WHEN 'morel_asignaturas_ei'.'activo_ei' =0 THEN "0" WHEN 'morel_asignaturas_ei'.'activo_ei' =1 THEN "1" ELSE "2" E...
asked by 12.06.2017 / 15:31
2
answers

how can I insert two insert into a trigger

As I can do two insert in a trigger try that but it does not work for me, if I put a single insert if it pulls but in phpmyadmin CREATE TRIGGER update_alumnos AFTER INSERT ON Alumnos FOR EACH ROW BEGIN INSERT INTO Procesos VALUES (new.id,1...
asked by 06.06.2017 / 15:47