Questions tagged as 'mysql'

1
answer

How to use 'limit' within a MYSQL procedure

Are you talking about beauty? Next, I'm setting up a procedure, where I enter as a parameter the number of rows it will return and if it is 0 or it is blank, it returns all possible rows, however in my logic it is giving syntax error and then...
asked by 15.05.2018 / 22:54
1
answer

Problems with CRUD using MySQL

I'm trying to create a simple CRUD, but I'm having problems with the query method. I wanted the method to display the following: Name, enrollment, course, phone and email in the first row and below the tuples information one by one in an orga...
asked by 18.06.2018 / 02:40
2
answers

Validation of 2 fields in a table

I have a table in Mysql, with a DESCRIPTION field and another Grade, how do I make the set of the two fields can not be repeated? EXAMPLE If it is: DESCRIPTION: abcde GRAU: 12345 OK And if it is: DESCRIPTION: abcde GRAU: 67891 OK...
asked by 17.06.2018 / 03:51
1
answer

Get record with SQL JDBC specifications

Hello, good afternoon. I'm having to develop a Java system with MySql. It's simple, just part of the backend, but I'm pushy and had not run querys with java before hehe. The system is the following, the basics: I have a database with a table...
asked by 10.05.2018 / 18:40
1
answer

Codeigniter - Retrieve categories from the bank

I have a table '' category '' in the database and it has the column 'id' and 'title', I am retrieving the same in several dropdown menu's, however it loads all categories of the database but I would like to load each category on its respective m...
asked by 01.05.2018 / 20:37
1
answer

How to exchange content without changing structure?

I started to make a website in the same code. Except that this site will have several pages on it on every page, the structure is the same, what changes is just the content. To not have to do in the code page by page, make a lot of pages, I want...
asked by 06.05.2018 / 02:36
1
answer

Relate column of one table with all other records

I have 2 tables, posts and posts_images , the post table has the fields id , title , category and images , and the posts_images table has: post_id , img_url and etc ..., / strong> of the posts table with...
asked by 05.05.2018 / 23:03
1
answer

Filter data in sql

I have a clientes table with columns: nome cidade email1 email2 It's not all customers who have registered with email. How do I mount a sql statement where it only returns clients containing email1 or email2 ?...
asked by 23.04.2018 / 15:41
1
answer

Request only the last product registered

I am creating a simple system to place order reservations, where I bring the products of the database through a simple while, but if I try to put brackets in my names, example name=name[] it brings all products when clicking on only one ,...
asked by 23.04.2018 / 16:25
1
answer

ERROR 1215: Can not add foreign key constraint (MySQL Workbench)

Hello, I'm trying to add a foreign key to a table but I get error 1215. I've already checked the attributes and all are compatible, the wallet field is a primary key, I do not understand why it's not possible to add the key. ALTER TABL...
asked by 18.04.2018 / 08:41