Questions tagged as 'mysql'

1
answer

show JTable based on selection JComboBox

I am developing a small application that fills me with a JComboBox based on a ResultSet. But I can not get it to show me a JTable with the results of a select *. To fill the JTable, I am using a mouse event so that when I select the table the JT...
asked by 08.04.2018 / 10:42
1
answer

I can not find a POO class in php

I am making a connection to a database through POO and it is throwing me an error that the "Connection" class does not find me, but I have it added as inheritance in the class "ReturnsProducts". I have 3 php files. 1) The one that makes th...
asked by 09.04.2018 / 01:00
1
answer

Warning: mysqli_query () expects at least 2 parameters, 1 given in php on line 160

I need help with this error ... my code is as follows (some guidance please): I already made the corresponding connection to my bd ... I try to fill in a form with data (inputs) at the moment of pressing button. .. execute that code, relating th...
asked by 22.05.2018 / 05:40
1
answer

Know time difference in mysql query

I have a table in mysql to see the wrong accesses of a login. If there are 3 records in less than 60 minutes I want to be able to block access to the ip address that you are trying to enter. In the database I keep 2 fields: ip: varchar format ho...
asked by 08.04.2018 / 19:13
1
answer

Join SQL columns data

In the following example: Could you merge the genre into a single column? For example: podcast = 1, Genre = Music, Fiction. podcast = 2, Genre = Art, Videogames, Politics.     
asked by 21.05.2018 / 20:36
1
answer

In MySQL the general_log registers queries that can not be executed?

In MySQL the general_log can register for example a UPDATE in the log even though the server is configured only in read mode read_only ?     
asked by 22.05.2018 / 10:59
2
answers

How to update a specific field of a table without being related to another one by foreign?

I have a little problem with this code and maybe someone can help me. It happens that I have three tables, loan, item, inventory. the loan and item tables are related, but the inventory is not, the fact is that when I make a loan, I have to decr...
asked by 20.05.2018 / 04:41
2
answers

What is the best way to establish a value of a dropdown from the database [closed]

I have a dropdown of blood type, and the values are hardcode, but when entering the interface, which is the best way to set the value previously saved from the database, I'm doing something like this: <select class="selectpicker" id="'.$key...
asked by 18.05.2018 / 17:11
1
answer

Problems when restoring a base in mysql

By mistake delete a table from my base, I have a backup before, but when wanting to restore it, it tells me that the table does not exist, I need to create it first? I already try to do it but there are many fields and I do not remember exactly...
asked by 18.05.2018 / 18:48
1
answer

Create an array of JSON objects with PHP

I have 3 classes in PHP which I use to extract information from a database with which I would like to print or return an array with json objects from all the states and their respective countries so that it will be somewhat similar to the follow...
asked by 22.05.2018 / 05:46