Questions tagged as 'mysql'

1
answer

retrieve data in a list for editing

In an edit page of the registration data, how to fill a selection with the information originally saved. Ex. In the registration form, a city was selected in a select. After saving, you have the option to edit the data, but I am not able to d...
asked by 07.04.2016 / 21:07
2
answers

Use the id for an insert without auto increment

In MYSQL I have a table of subscribers where the primary key is the subscription number which is a column that does not have auto-increment, I can not change that. I made, in Codeigniter, a method that takes the next id for insertion like...
asked by 09.03.2016 / 18:30
1
answer

Champ Error inconnu dans on clause - SQL

I have the following situation with 3 tables: ocorrencias : It has 6 columns: tipo_falha_1 to tipo_falha_6 . It is a 2-digit code, from 1 to 20. tipo_falha : Has a description of the faults. The cod field is...
asked by 10.03.2016 / 12:39
1
answer

1264 Out of range value adjusted for column with decimal field

I have a hotel table in my database with a estrelas(decimal(1,1)) column that receives the hotel's note (from 0.0 to 5.0), but whenever I try to enter or change a field and put a higher value that 0.9 it does not record giving this alert:...
asked by 08.03.2016 / 21:15
1
answer

Modeling for student attendance

I have questions regarding the structure of the database for a frequency system. I thought of two structures and when doing a search I saw that the two exist and are used in different systems. 1 - The first one I have a frequencia table w...
asked by 18.04.2016 / 23:40
1
answer

How to transform 2 form's into 1 only '

Good morning everyone,  I have these two forms that would be an input and an output, the two do insert in the bench, how could I do to become 1 so: <div class="col-md-6"> <div class="panel panel-danger"> <div class...
asked by 18.04.2016 / 14:15
1
answer

Problem with SUM in NamedQuery

I have the following NamedQuery : @NamedQuery(name = "Controle.listarTotais", query = "SELECT controle.prestador, controle.tipoPrestador, SUM(controle.valorLote), SUM(controle.valorPago), SUM(controle.valorGlosa) FROM Controle controle W...
asked by 10.03.2016 / 18:44
1
answer

Query does not return results in PHP [closed]

There is a query in my PHP where I search the mailing list and return to PHP, however, it is not returning any results. Code PHP looks like this: <?php session_start("admin"); if($_SESSION["admin"] == "on"){ inclu...
asked by 16.03.2016 / 15:59
1
answer

Error fetching list in MYSQL

I have a problem in my system to send newsletter emails, when loading the index, where the list of registered emails are loaded, the following error appears: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /...
asked by 16.03.2016 / 15:23
2
answers

Select All NULL and NOT NULL Records

I have two tables: Medals and Grocery Store . I want to bring in just a% of all medals and create a column to put your situation. There would be two statuses, Yes and No . The structures: MEDALS ID MEDALHA MEDIA SHOP...
asked by 07.03.2016 / 13:30