Questions tagged as 'mysql'

1
answer

What is the weight of a subquery for the query?

During the development of some queries in the database, I come across the situation of the need to perform a new query, but another solution in some cases may be the subquery. So what is the best solution to perform a second query or use subq...
asked by 08.05.2014 / 15:37
2
answers

How do I get the last id inserted in ASP.NET?

I'm making a website in ASP.NET, and I need to register a user / client. The question is: as soon as I enter the values in the users table, I need to get the id of that table and use the end_user table (user address table) t...
asked by 13.05.2014 / 02:28
4
answers

Limit the number of SQL query rows

I have the following Query SELECT estado, num_ocorrencia FROM bra_ocorrencias WHERE nome like 'João' ORDER BY num_ocorrencia DESC It returns me all states with the most relevant occurrence numbers I have in the table, I would like to narrow...
asked by 05.07.2018 / 17:55
4
answers

Remove part of text inside column in MYSQL

I need to remove an HTML code from within a tab in the database. In the case the table name is OBS, and inside it has normal text inside a p and also another p with the following code: <p><a target="_blank" href="/uploads/docs/...
asked by 23.05.2018 / 20:09
1
answer

Function for file upload

I'm trying to create a function that takes 1 value from a input do tipo texto and 1 file. I was able to move the file to the folder however I am not able to develop SQL to insert the file name into the database. The ID and name is u...
asked by 11.08.2015 / 20:24
3
answers

How to do multiple inserts at one time?

Well I have 3 tables in my database, and I make a INSERT in the sale table, and as soon as I enter the data in it automatically I would have to insert into the and the vendaproduct table that would be this code: if(isset($_POST['s...
asked by 10.12.2015 / 17:55
4
answers

Most common words among rows

Is there a function in MySQL that gives me the 3 most common words between a column in TEXT format of a table? Example Maria Joaquina Maria Antonienta Maria B.     
asked by 30.12.2014 / 00:26
2
answers

Increase number of rows returned by select group in MySQL

I have a table with 1 million rows that I need to make a report that groups the repeated names. I'm doing this SELECT instituicao, count(*) from base_wos GROUP BY instituicao; . However, MySQL always only makes the group of the first 100...
asked by 13.04.2014 / 01:27
4
answers

I can not concatenate a variable in a query

I have a URL and a code that will vary all the time (Ex: usuario/perfil/39 ). I used the following code to get this value from the URL: $valor_id = $_SERVER['REQUEST_URI']; $cod = explode("/",$valor_id); $codigo = $cod[4]; So I n...
asked by 14.10.2014 / 05:20
4
answers

Row size too large (8126)

It gave me an error loading mysql data.   Row size too large (> 8126). Changing some columns to TEXT or BLOB or   using ROW_FORMAT = DYNAMIC or ROW_FORMAT = COMPRESSED may help. In current   row format, BLOB prefix of 768 bytes is stored i...
asked by 09.06.2014 / 18:52