Questions tagged as 'mysql'

1
answer

Create user with access only to database views in MySQL

How do I create a user that views only the views of my database in MySQL? I'm using the following settings:    Ubuntu Server 14.04.5 LTS   MySQL: 5.5.55   Apache: 2.4.7   phpMyAdmin: 4.0.10     
asked by 18.07.2017 / 14:31
1
answer

Retrieve HTML text from the MySQL database with EJS (Node.js)

I'm developing a news portal on Node.js where I save posts to a MySQL database. As a template engine, I use EJS. I use the Tinymce plugin to format the text of the posts (use bold, italic and etc). Tinymce is a visual editor for robust Intern...
asked by 28.05.2017 / 16:29
1
answer

Recover database from .frm and .idb files

My backup was incomplete and corrupted my ibdata database, now my database does not access my tables. Giving error! I do not care about the data! But I really need the structure of the tables. Is there a way to retrieve the structure from the...
asked by 06.07.2017 / 21:42
1
answer

What's wrong with this query?

I have a DBUpdate function that updates the data in the database. This function creates a query based on the array passed as a parameter. For example, if I send this array (as $visit ) 'ips' => '192.168.25.1, 127.0.0.1' 'real'...
asked by 19.05.2017 / 23:26
1
answer

SQL query with SUM, displaying the return in rows [closed]

So I have a question that is consuming my insides. Could someone please tell me how to return a total of records from a query, via SUM (SQL Server) function, displaying the total of rows proportional to the number of records rather than the valu...
asked by 05.05.2017 / 23:52
1
answer

Complete fields with select

I have a problem, which I can no longer solve, I am trying to fill the fields from an option that is contained within a select that is automatically populated with foreach , but it is not working <script language="JavaScript"&g...
asked by 14.06.2017 / 21:35
1
answer

How to know the result number inside a loop with mysqli_fetch_array?

How to know the result number inside a loop with mysqli_fetch_array to have a condition that separates the first from the rest? In my table sql only contains a single integer field id . What I want to do is get the first e...
asked by 29.04.2017 / 13:45
1
answer

Data overlapping the x-axis of the graph

I need to put a series of dates (timestamp) that are stored in a bd on the x-axis of a chart, the problem is that the dates overlap and an efficient analysis is impossible. Follow the code: # -*- coding: utf-8 -*- import MySQLdb as mdb import...
asked by 06.06.2017 / 21:48
1
answer

SQL select with two or more occurrences of a table on the same row?

In a relational bank terminations has 1 contract, the contract has 1 property and two people (lessor) in>) how do I prepare SELECT to return these two people on the same line? SELECT rescisoes.rescisao_id as id, rescisoes.data_de...
asked by 14.04.2017 / 14:40
2
answers

How to store multiple user names in a variable?

I have a form , and I make a query in the database: private void Consulta() { var dataCom = Convert.ToDateTime(label1.Text).ToShortDateString(); var conf = $"select * from data where data_venc = '{Datacom}'"; var comando = new MySqlCo...
asked by 19.04.2017 / 05:41