Questions tagged as 'mysql'

1
answer

Group results mysqli

I'm trying to group results from a table so that I can add all the quantities of the same model, but I do not quite understand how it works. I will try to explain what I need to see if I am able: I have 2 tables that are called orders and oth...
asked by 12.11.2017 / 13:34
1
answer

extract query value from a variable in mysql

I have a query in a mysql trigger with a query similar to BEGIN set @correos=(select correo from tabla_correos group by correo) END the table has the following structure and information | tabla_correos | ---------------------...
asked by 19.12.2017 / 22:34
1
answer

how to do an INNER JOIN and show in php

   Table notes with the following fields The problem is that the student ID comes out, and I need to bring the student's name from the table alumnos I currently have my query on php in the following way: $getNotas = mys...
asked by 29.11.2017 / 04:51
1
answer

Infinite loop of mysql

I have to take out a stored procedure, to simplify fractions (divide by the same numerator and denominator number). However, when I run the script it stays running for a while and the MySQL connection is cut off. My code is as follows: deli...
asked by 29.11.2017 / 00:25
1
answer

Why does not the code work for me? Help with PHP

I created a php with a tutorial on the internet and it used to work but suddenly it has stopped working. If you can help me, thank you. there goes the code: <?php if(isset($_SESSION['id'])) { header("Location: user.php"); } if(isset($_P...
asked by 19.12.2017 / 19:20
1
answer

Ajax does not work

Container folder: Folder js Sub-Folder ajax JS File ajaxlogin.js Folder php PHP file consultas.PHP HTML file index.html My code is as follows: index.html <!DOCTYPE html>...
asked by 07.11.2017 / 21:51
1
answer

One-to-One Relationship in Spring JPA does not migrate the foreign key

I have two entities in my Spring Boot project that uses Spring JPA and a MySQL database with Hibernate. These two entities are related to a One to One relationship. The problem is that when I try to add a type of objects, the primary key of the...
asked by 24.11.2017 / 12:45
1
answer

Problem using IF EXISTS

I'm new to this, I'm having trouble implementing the following code within a stored procedure: Basically, what I'm looking for is to check if the table exists and if it exists, delete the data and then the table: IF EXISTS (select TABLE_NAM...
asked by 27.11.2017 / 11:51
1
answer

How to show a start and end range grouped by states in MySql?

I have a table called documents with three registers id, number, state. What I want to do is get a query with the intervals (min and max) for each record. To be more descriptive if the table is filled, with the following data: | numero...
asked by 21.11.2017 / 06:05
1
answer

Warning: mysqli_num_rows () expects parameter 1 to be mysqli_result, boolean given

The function performs well the registration but does not respect the if and shows:    Warning: mysqli_num_rows () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ projectphp \ model \ teacher.php on line 30 p...
asked by 04.01.2018 / 01:42