Questions tagged as 'mysql'

1
answer

Change the array keys returned by mysqli_result

I need to change the keys of a result obtained by mysqli_result->fetch_assoc() If I do this search: "SELECT exemplo.nome, exemplo.apelido, exemplo.idade FROM exemplo WHERE exemplo.id=1" I get this result $result["nome"]= "Ant...
asked by 09.03.2015 / 11:40
1
answer

query by the number of the day of the week Mysql

The week has 7 days, so I want to be able to make an appointment depending on the day of the week you choose to show the result: mysql_query("SELECT * FROM tbl_eventos WHERE WEEK(data) = '$semana_atual' AND YEAR(data) = '$ano_atual'"); Now...
asked by 11.02.2015 / 16:31
1
answer

Automating Inner Join using LookupComboBox component

Sometimes I use the TDBLookupCombobox component to bring up a list of a dataset lookup field, this approach streamlines some things but is quite limited. For example I have a list of stores in one TDBLookupCombobox and another a list of clien...
asked by 21.02.2015 / 08:29
1
answer

How to manipulate multiple banks with Hibernate?

I'm testing Hibernate and I ran into a question. I have the following configuration: hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration...
asked by 30.11.2018 / 15:47
0
answers

MYSQL 5.6 does not recognize the query as it should

Greetings! I'm building a query to take every moment the value was at 0 on a given day and the highest time of the day before. The data in my database is similar to the one I put in SQL Fiddle . Time_Stamp and Value column. So far, I have...
asked by 07.12.2018 / 18:54
1
answer

How to retrieve data from the CodeIgniter session directly from the database?

I'm trying to retrieve data from my table ci_sessions of CodeIgniter that are serialized. $data = $this->db->get_where('ci_sessions', array('id' => $id))->row('data'); var_dump(unserialize($data)); And I get this...
asked by 18.05.2015 / 21:15
1
answer

Display data from two tables in grid with YII framework

Hello, I'm starting to develop web and I'm having a problem working with YII framework 1. I have in the application a grid that displays: product name, segment, price . All of this data comes from the database in two customer and produ...
asked by 09.10.2018 / 01:39
1
answer

Build SQL to generate a dataset and populate a Treeview

I'm having a database here and I'm looking to set up a SQL to generate a dataset in Delphi and then populate a Treeview. The figure below shows part of the bank, but that is the general structure of it: Basicallytheuserlogsintothesystem(tbuse...
asked by 23.06.2015 / 14:45
1
answer

Competition problem in java web application

Good evening guys, See the following code: Controller @WebServlet("/testConcurrency") public class TestConcurrency extends HttpServlet { private static final long serialVersionUID = -6124392524678396101L; @EJB(name="bs/UsuarioBS...
asked by 21.09.2014 / 02:26
1
answer

Saving array to database without serializing

I am building a social networking website where the user can belong to groups and comment on posts. I'm trying to save group memberships and comments cleanly to the database, preferably without serializing the arrays, but I'm not finding a wa...
asked by 08.09.2014 / 03:05