Most voted "mysql" questions
Mysql is a relational database management system (RDBMS) that functions as a server, and provides access to multiple users simultaneously. Your source code is available under the GNU General Public License.
Learn more…10,264 questions
Sort by count of
-
2
votes2
answers9692
viewsEntity Framework Query with Inner Join and Where
I am making a query using Inner Join of some tables and a Where with only one condition, but the data is not returned in EF,the same query in Mysql works and returns data. Follows the code: string…
-
2
votes1
answer1103
viewsCodeigniter - Dynamic form
all right? Well.. I’m a beginner in the world of Web Programming and I’m trying to develop a codeigniter system. Can you help me? I’m trying to make a dynamic form in which I have a select that has…
-
2
votes2
answers69
viewsHow to create a page that displays database entries?
I have a system with a registration page, I would like another page that shows all the records that have been made, cute as a matrix. EXAMPLE: ID NAME E-MAIL 01 Mariana [email protected] 02 Bayonetta…
-
2
votes1
answer776
viewsCalculations in mysql SELECT vs. calculation in script
Let’s say I want to calculate the percentages of records in a mysql table for certain information, such as users up to 20 years old, from 21 to 30 years old, and over 30 years old, and this table…
-
2
votes2
answers217
viewsHide field from select mysql
Well I’m used to doing the select as follows: select nome, idade,cidade from cadastro This select me returns the fields name, age, city. But I want to do the opposite, I have a table with many…
mysqlasked 7 years, 3 months ago Hugo Borges 5,294 -
2
votes1
answer663
viewsUser has exceeded the 'max_user_connections' Resource (Current value: 4)
I have a problem regarding open connections in the database, where error is occurring if the application tries to create more connections than the limit. Assuming the application creates and closes…
-
2
votes0
answers85
viewsHow to configure mysql and apache manually?
I used xamp but it always gave some port problems, so I downloaded and configured apache and PHP manually, but now I don’t know how to configure Workbench and integrate it with apache
-
2
votes1
answer639
viewsIs there a nomenclature standard for table index names in Mysql?
It seems simple this question, but wanted to know how to set a pattern. Usually using the Mysql Workbench a default is set automatically, as in the example below: fk_tabela1_tabela2_idx Note: I am…
-
2
votes2
answers1684
viewsSelect with INNER JOIN, bringing fields that have NULL foreign key
I have a table items, requested items, interested (she has self relationship, is used for secretariat, sector and employee, and a table requested), in the table requested I have 3 foreign keys (one…
-
2
votes1
answer100
viewsHow do I define custom sorting on the return of a DB?
Today I have a simple product catalogue (images) that shows all products together or by categories. However, when I show all together I can only order by ASC or DESC, but I need to order…
-
2
votes2
answers644
viewsError in select with PHP + Mysqli
I’m trying to use a query to pull one ID specific that comes from another page. I can receive the ID for $_GET, i printed the query to see if it was right, even so of the error and does not show me…
-
2
votes2
answers63
viewsError adding elements in Mysql Database with PDO
I am having the following error while inserting into the database: Parse error: syntax error, Unexpected '{', expecting '(' in /var/www/public/Test/db/add-bank.php on line 18 Line 18 is: } catch {…
-
2
votes1
answer526
viewsInsert account with Fortnightly, Monthly, Quarterly, Biannual and Annual period
I have a script to do financial control, in it I inform the value and quantity of each installment. I would like an idea of how to define the space of these plots to define whether they will be…
-
2
votes1
answer390
viewsHow to transfer the row of a table in column
I’m breaking my head with a problem, I need the information of a column, built through query, to turn into line (query header). I saw some tutorials and related debts but could not implement: PIVOT…
-
2
votes1
answer284
viewsAdd variables to columns (Mysql)
I have a question, it is possible to add variables in a column? Codigo Test var sql = "INSERT INTO sometable (someparam) VALUES (varToParam)"; con.query(sql, function (err, result) { if (err) throw…
-
2
votes2
answers9602
viewsGenerate csv file in php
Hello guys I am trying to create a php query in mysql database to generate a csv file according to the code below. The problem is that the part that would download the file is showing error, I…
-
2
votes3
answers38
viewsSelect in each response different values with Mysql Database
I would like to know how to select the number of records from a table where only values greater than 6 are selected, but each result is different, with the Mysql database, for example: Tabela Notas…
-
2
votes2
answers5648
viewsHow to change the name of a column in a select in the database?
I am making a database for a college activity and was asked to display the table by changing the name of attributes(columns) to "Nome do Cliente" and "Endereco do Cliente". How can I do that?…
-
2
votes1
answer148
viewsHow to use foreign key to create a record in another table
I have two tables users and users_info, would like to use foreign key, for when I create a record in the table users, create a record with the empty fields in the table users_info, only with the…
-
2
votes1
answer97
viewsIssue Statement of Services
Good afternoon staff I am trying to issue a statement of services from my record. follows my database CREATE TABLE `cad_cliente` ( `id_cliente` smallint(5) UNSIGNED NOT NULL, `nome_cliente`…
mysqlasked 8 years, 5 months ago Cristiano Cardoso Silva 356 -
2
votes1
answer85
viewsRandom selects with PHP and Mysql
Are there any way to make random selects with php and mysql. Example: 1- I have the chart carreta_furacao: id----nome 1----Fofão 2----Capitão América 3----Popeye 4----Mickey 5----Palhaço 2- In PHP I…
-
2
votes0
answers95
viewsHow to perform selects through Workbench Diagrams?
I am migrating to Mysql Workbench and need to perform a relationship between tables SELECT... INNER JOIN... LEFT JOIN..., but I wanted to accomplish through the diagram of Diagrams. How can I…
-
2
votes0
answers62
viewsIgnore record when missing Mysql / PHP information
I have a PHP registration form in the Mysql database. After completing the form, the user is redirected to the page cad.php where it says that the registration was made successfully and in 3 seconds…
-
2
votes2
answers360
viewsCorrect way to make a great Inner Join
Good morning, you guys. I’m a beginner in php and I’m developing a program for controlling file boxes. I have a database in which the table "box" is the main one, it has several references to other…
-
2
votes3
answers111
viewsPrevent data from appearing in MYSQL search
I have a table composed by the following columns, ID, Produto, Compra, Venda and Resultado. I know the syntax to select the values I want, Example: Select * From tabela_exemplo where Produto =…
-
2
votes1
answer101
viewsHow to change an attribute in the bank via a button
I’m creating a small college project in Ruby on Rails and I came across a problem: I have a table called Person and another call Tools. People have many tools and every tool and owned by one person.…
-
2
votes1
answer157
views -
2
votes1
answer239
viewsrecursive query in related tables using Foreign Keys
There’s a database with a name Register and on this bench there are three tables PARENTS, CHILDREN and GRANDCHILDREN: On the table PARENTS I have two criminal records: Along with the table CHILDREN:…
-
2
votes1
answer923
viewsGenerate dynamic HTML with ASP.NET
Good people, I have a project, and I need to generate a card with dynamic HTML, pulling from an sql server. The case is as follows, I have an html CARD, all stylized. Which in this case is the code…
-
2
votes1
answer1874
viewsScheduling System by Date
I have a scheduling system, where I have to return the dates and times available (not registered at the bank obviously) for a new schedule with those available dates and times. I don’t have a sense…
-
2
votes2
answers254
viewsDifference between relational table and online record
I have a structure of companies and categories organized in 3 tables: empresa -> Registration of all registered companies. categoria -> Registration of all registered categories.…
-
2
votes2
answers71
views -
2
votes0
answers544
viewsCreate Mysql Trigger / Stored Procedure to change features of a column
I am trying to create a Trigger/Stored Function for when the user changes the value of a column from 0 to 1 it changes the feature of another column CREATE TABLE `aluno` ( `CPF_ALU` varchar(11) NOT…
-
2
votes1
answer75
viewsGet single lines in the database, mysql
It is necessary to obtain lines that are not have duplicates in a table, I did some research and found the function DISTINCT but this does not solve the problem, because it somehow groups the data.…
mysqlasked 7 years, 2 months ago Vinícius Lara 3,750 -
2
votes1
answer604
viewsQuery in three tables by a column with Foreign Key
This was the way I found to make a query in my three tables: PARENTS, CHILDREN and GRANDCHILDREN using the operator LIKE: SELECT `PAIS`.nome, `FILHOS`.nome, `NETOS`.nome FROM `PAIS`, `FILHOS`,…
mysqlasked 8 years, 5 months ago user45474 -
2
votes1
answer51
viewsWhat is the procedure for entering 1 only 1 checkbox value in mysql with php?
In the research I have done on checkbox I have seen several alternatives for inserting checkbox values, using methods with array and loops. However I want to insert only 1, it is still necessary to…
-
2
votes3
answers154
viewsCount how many days from today to the bank date
I need to create a PHP application that reads the date of a column inside the MYSQL database and compare with today’s date, after comparing it should print the difference of days. Example: In the…
-
2
votes1
answer971
viewsStored Procedure com if
I have a table with the fields name, id and salary. I need a trial that changes the employee’s salary, if she receives one, should increase the salary by 300 reais, in case another value decreases…
-
2
votes1
answer298
viewsChange server CRON function via PHP
You can change any CRON function with PHP or any other language? For example, I have the following non-server function: 30 15 * * 1-5 php /var/www/html/projetos/hist_06.php In this application the…
-
2
votes1
answer1417
viewsQuery mysql to take two-line data and merge into one
Hello, I am unable to execute a query in mysql. I have a table that has the following fields: numero | data | descricao | norma 001 | 2017-02-28 | Lapis | NBR 001 | 2017-02-28 | Lapis | ISO As in…
-
2
votes1
answer67
viewsRepetitions and combinations of values
I have a table (corner) with 5 fields, each field can have the value from 1 to 80. I wonder if it is possible in SQL or only in Delphi, to catch the dukes (combinations of 2 numbers) between 1 and…
-
2
votes2
answers75
viewsQuery with calculation returning error in condition
I have the following select: SELECT imp_loja AS LOJA, imp_item AS ITEM, imp_desc AS DESCRICAO, imp_dias_giro AS DIAS_DE_GIRO, imp_nec AS NECESSIDADE, imp_pedido AS PEDIDO, imp_bancao AS BANCAO,…
mysqlasked 8 years, 5 months ago Chefe Druida 1,086 -
2
votes0
answers56
viewsSort by deep JSON column
I have a column called data, which has, for example, this JSON [{"name": "unit", "value": "2", "validator": ["required"]}, {"name": "name", "value": "teste", "validator": ["required"]}] I need to…
-
2
votes1
answer422
viewsCreate blog from scratch without using wordpress
I need to create a blog without using Wordpres or any other ready-made structure, which language I can use and which is the fastest way to do it, the blog has a form that will save the e-mail, nome…
-
2
votes1
answer231
viewsHow to calculate the distance between X and Y with Intersection points
In the image above I have mapped the separation positions within the warehouse where I work. I need to calculate how far the person you’re separating travels inside the warehouse. For example if the…
-
2
votes1
answer556
viewsPassing BD query by Node for Array in Javascript Front-end
Hello, recently I’m studying a little web programming (I’m very early) and I ended up falling into Node.js, I’m finding everything amazing I’m just having a certain problem, I want to access mysql…
-
2
votes3
answers1376
viewsRetrieve data in Mysql DB using AJAX/PHP to create a badge containing DB item count
I need to get an item count in my Mysql DB using ajax and php. My ajax is like this: <code> $(document).ready(function(){ $('#badgewel').empty(); //Limpa a tabela $.ajax({ type:'get', //método…
-
2
votes3
answers869
viewsQuestions to send data via POST
Hello, I’m trying to send over $_POST some data for validation and later insertion in the database, what I could do in another project exactly the way I’m trying to do now, but I’m not getting it.…
-
2
votes0
answers58
viewsWhat is the best architecture? Mysql multi BD or single?
We are currently working with a web software that is going to the market with great acceptance. It receives many partner interfaces and generates a lot of content for each table. In the past we…
-
2
votes1
answer99
viewsUnanswered PHP in fetch command
I am studying with a book use the head and the following I practically copied and pasted the sample code just changing the names of the variables and I am not having the return with my code, in fact…