Questions tagged as 'mysql'

2
answers

How do I convert LINQ to SQL for MySQL?

I'm trying to remove the use of SQL statements from within the system (to make it flexible on the database that will be used), I use statements Insert , Update and Delete via stored procedure (for performance and for flexibi...
asked by 28.01.2015 / 14:57
1
answer

Type Double and type Decimal

I found in the SO a question with an answer well accepted by the community # But I never had problems with double for monetary calculations, I had yes with float that already left my hair standing, then from this answer stating...
asked by 17.04.2015 / 20:14
3
answers

How do I count the number of products by category?

Ihavethetabletbl_produtosproduct_idproduct_namecat_productIhavethetabletbl_categoriascategory_idcategory_nameHowwouldIcountthenumberofproductsforagivencategory,forexampleCartazes,whichis000001SQL?  Update     
asked by 25.11.2014 / 18:20
1
answer

How to save multiple inputs with the same "name"?

I need to save multiple input that contains the same "name" , but the problem is that it only saves 1 single result for several. Example: <form method="post" action="guardar.php"> <input type="hidden" name="produto" value="t...
asked by 30.03.2015 / 00:50
3
answers

How to sort by Like relevancy?

I am doing an autocomplete that makes a request to a url, which in turn queries the database. This query is done with LIKE . I use %$termo% to be able to query, however I would like to sort the result according to the relevance o...
asked by 17.05.2017 / 16:17
3
answers

How to delete the last record from a table?

I was using the following code in mysql: delete from aluno where id=(select MAX(id) from aluno); But the following error appears:    Error Code: 1093. You can not specify target table 'student' for update in FROM clause.     
asked by 09.08.2016 / 19:30
1
answer

How to remove duplicate lines efficiently?

I'm normalizing a table here and found that there are duplicate rows. The way I chose to clean these lines is through: CREATE TABLE tabela_nova AS ( SELECT DISTINCT * FROM tabela_antiga ); The problem this way is that it is very slo...
asked by 10.06.2015 / 01:56
2
answers

Join two tables with PHP

I have two tables in the database, one listing the posts made and the other one of the registered users. Columns that I have in the posts table: ID || TEXTO || ID_USER || Columns that I have in the user table: ID || NOME_USER || SENHA...
asked by 31.08.2014 / 07:31
1
answer

How to fix EntityValidationErrors

Hi, I need some help. After compiling my project I'm getting an error:    Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. I have already discovered that this error is caused in the execu...
asked by 30.05.2014 / 05:26
1
answer

What is the given name for the number of columns in a table?

What is the given name for the number of columns in a table? And the name for the number of rows?     
asked by 07.06.2017 / 19:05