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
-
1
votes0
answers72
viewsHow to improve my input and output validation
I have the function inserir, and in it has an input and output validation, first she makes a select with the function count with a where referencing the product code, then it falls into condition…
-
1
votes2
answers584
viewsMysql configure error in xampp
I’m setting up the XAMPP v3.2.2 and my MySQL is not working, follows the error: Error: MySQL shutdown unexpectedly. 5:46:11 PM [mysql] This may be due to a blocked port, Missing dependencies,…
-
1
votes2
answers416
viewsConcatenate CPF in Mysql
Good Afternoon I would like to know how to concatenate 11 digits in the format of a CPF. Like, format for a CNPJ, I did this: update ger_ter set cpfcgc = CONCAT(SUBSTRING(cpfcgc, 1,2), '.',…
mysqlasked 6 years, 10 months ago Maurício Maciel 27 -
1
votes2
answers24
viewsShow the three best rated vehicles from a table
I am making a website for the course, but I have a problem. I chose to use two tables, one for "ratings", and one for "vehicles". I would then like to select the 3 best rated vehicles from the…
-
1
votes1
answer59
viewsHow to show the record that was most repeated in the MYSQL table?
For example, if I made a record of John about 5 times ( ie, I made 5 records of John) and then made the record of other names normally,without repeating or anything, I wanted to know how to give a…
-
1
votes1
answer96
viewsHow to use time_format() in Mysql?
I made a table like this: create table tabela ( hora time not null ); This table returns me hour, minute and second. How is the table with time_format()? I want to leave it with the time and the…
-
1
votes0
answers44
viewsHow do I display the areas of each category?
Good evening guys, I’m in need of a little help I wound up here in PHP, is the following, I created two tables category and area, each category has several areas, each area can only have one…
-
1
votes1
answer155
viewsSmallint or int to PK / Primary Key / Primary key?
In languages such as Java, for example, when processing a short int and comparing it with another short int, both are transformed into int. The same occurs in databases like Mysql?
-
1
votes2
answers158
viewsMysql update filtering by due date with tolerance of x Days
I need to update only records that are expired and add a tolerance of x days Example Tolerance of 5 days Today is = 11/10/2016 id= 1 maturity = 10/10/2016 // only update if today was day 15 id= 2…
-
1
votes1
answer46
viewsOrganize Listing by mysql data parent item in php
I have a list to do that will work as follows: <li id="1">Pai <ul> <li id="2">Item 01</li> <li id="3">Item 02 <ul> <li id="4">Item 03</li> </ul>…
-
1
votes1
answer346
viewsHibernate does not update information
My problem if it comes to an update unsuccessfully follows the code below. EntityManager manager=JpaUtil.getEntityManager(); EntityTransaction trx= manager.getTransaction(); trx.begin();…
-
1
votes1
answer40
viewsRegister filter by date
My code is not working which may be wrong? In the database the date is with Date/Time as datetime, follows the code: <?php $query = $mysql->query("SELECT * FROM c_clientes WHERE…
-
1
votes0
answers21
viewsHow to minimize mysql 4 to 5 migration issues
Good evening guys, I have a system that was developed last year for a client. The client hired a server and the staff installed mysql 5 on it. The problem now that I am is that int and date field…
-
1
votes2
answers128
viewsHow to insert primary keys from an X table into a Y table
Hello, good, I’m having a hard time giving insert in the table divide, being that in it I have two FK’s that link the table person.. My question is the following: How to get the desired PK’s and…
-
1
votes2
answers532
viewsEncrypted password check
I’m having a hard time logging in Delphi with encrypted password at the bank MySQL, I can do the registration and encrypt the password in the database through Delphi with the StoredProcedure that I…
-
1
votes1
answer56
viewsUpdate record in table using Selected in MYSQL
I’ve got this problem I can’t seem to solve. I have the following tables in the database: And in the form he pulls the correct data, but now that I will update for example only the plate and do not…
-
1
votes2
answers107
viewsInsert with monthCalendar in Mysql and C#database
I need to make a insert of the date with the monthCalendar in C# in the database MySQL, only that the format of the date of MySQL is (yyyy-MM-dd) and I’ve already modified the code : I modified the…
-
1
votes2
answers1371
viewsHow to avoid duplication of record in a table in mysql
How do I not let repeat the plate in the register? <?php $placa = $_POST['placa']; $cidade = $_POST['cidade']; $estado = $_POST['estado']; $query = "INSERT INTO veiculos (placa, cidade, estado)…
-
1
votes1
answer56
viewsTemporary reserve
I have the following problem: I am creating a booking application and as soon as a user clicks on a product to book, this product should be removed from the list of available temporarily for him to…
-
1
votes1
answer60
viewsMysql doubt in Select
I have a table of chats on mysql, the record of conversations between users. The fields are. id, id_from, id_to, message Example (My Data in DB): 1, 50, 10, 'Hello' 2, 10, 50, 'Nice?' 3, 50, 10,…
-
1
votes1
answer193
viewsMysql Function returning NULL
My faith works for nothing in this world The SQL is like this: -- Function used to return the remaining space of a chosen folder. -- DELIMITER $$ CREATE FUNCTION tamanhoRestante (_idPasta INT)…
-
1
votes1
answer10554
viewsGenerate Mysql Workbench Script
Good afternoon. I use Mysql Workbench 6.3. I need to generate the script to create the local database to publish on the server. It is completely impossible to create everything again in the hand…
-
1
votes1
answer542
viewsHow to popular a postgres table with JSON?
I would like to popular my tables with Json. But I’m not getting it. Does anyone have any solution? Follows JSON: https://gist.github.com/letanure/3012978…
-
1
votes0
answers209
viewsEstimated run time - Select
I’m performing some performance tests in my BD using Mysql, and I got the following question. Is there any way to predict how long it will take to execute a query in Mysql after starting its…
-
1
votes0
answers153
viewsReal-time request with ajax
I need to update some information in real time, I did some research here on stackoverflow and found a very good post, but I could not make it work. In the post the following was explained: Ajax that…
-
1
votes0
answers32
viewsHow should passwords be recorded in a database?
I am creating a program in Java, connected with a database, my problem is whether I should create a new tebela to save the password and the name of each user or whether I should use this data as…
-
1
votes4
answers1474
viewsRemove text within column in MYSQL
I need to remove an HTML code that is inside a tebela in the database. In case the table name is OBS, and inside it has a normal text within a p and also another p with the following code:…
mysqlasked 6 years, 9 months ago Felipe Viero Goulart 3,693 -
1
votes0
answers122
viewsWhich best Mysql index
Hello I have a question about explain, index in mysql Real Estate Table 47.240 Table of Order of Attendance 1,887,421 SELECT SQL_NO_CACHE COUNT(*) FROM imoveis I INNER JOIN situacao_cod_venda SCV ON…
-
1
votes1
answer45
viewsUpdate does not find what was typed in the inputs
I have a system where you can change the information of a record through an editing form, only this edition is not being saved. HTML <?php $lnk = mysqli_connect('localhost','root','') or…
-
1
votes1
answer116
viewsPrimefaces does not locate Panel and Datatable components
I’m doing a job where I use Primefaces + Ajax + Hibernate. I have a screen to include/change a client that should open in a modal every time the user clicks on the button. And in this same code I…
-
1
votes3
answers229
viewsDisplay the result of a COUNT in the Database
The PHP code looks like this: $con = new PDO(SERVIDOR, USUARIO, SENHA); $sql = $con->prepare("SELECT COUNT(id) FROM quiz;"); $sql->execute(); $n = $sql->fetchObject(); And the HTML code…
-
1
votes0
answers47
viewsHow to send combobox data to a DBMS sql server?
I have an application where one of the formularies contains a comboBox with data entered from the property Item (Collection). How to send data that is in this comboBox to a sql server database ?…
-
1
votes2
answers1280
views -
1
votes1
answer48
viewsHow would this PHP be converted to mysqli instead of mysql?
I need urgent the following PHP that was built in msql is written in mysqli it is part of an application in which I am developing I have no knowledge in PHP I’ve broken my head behind a conversion…
-
1
votes1
answer346
viewsError using PDO prepare() function
I’m on a new project, and I need to use the prepare() of the PDO, I do not know why, but only with him who is giving this error, every time it has some function, or some line with prepare(), PHP…
-
1
votes1
answer3603
viewsHow to connect Mysql in Visual Studio 2015?
I have Visual Studio 2015, I created a project and I want to connect three databases in it (Firebird, Paradox and Mysql), initially the Mysql. I created a new project like this: C# > Windows >…
-
1
votes1
answer83
viewsSUB-CONSULTATIONS IN SQL?
Using the BD below, how would return the name of the person who rented the date '2016/11/17'. Name is in the person table and the date in the loan table. CREATE DATABASE escola; USE escola; CREATE…
-
1
votes1
answer91
viewsMysql Error: ER_TOO_LONG_KEY
I’m getting the error in Mysql and don’t know how to fix it. Below is listed the output: code: 'ER_TOO_LONG_KEY', errno: 1071, sqlMessage: 'Specified key was too long; max key length is 767 bytes',…
mysqlasked 6 years, 9 months ago Luiz Felipe 32,886 -
1
votes1
answer52
viewssearch data in Mysql and php table
I have table A with id and user fields and table B with id, data and id_A; On the PHP page I want q to appear the contents of table B, and with id_A to find the name in table A. The main thing for…
-
1
votes1
answer38
viewsDelete Rows from a table except a MYSQL amount
I have in a table the columns: codigo, cliente, token_md, val, cartcodigo, clientenome, clientesobrenome, clientecpf, clientenascimento I need to delete exactly 46,550 rows from this table, no order…
-
1
votes0
answers33
viewsMysql code passed to Mysqli does not generate desired actions
I have a code that is for inserting/changing/deleting columns and rows from a database table, it worked very well when it was by Mysql, I tried to make some changes to Mysqli, at first it presents…
mysqlasked 6 years, 9 months ago Gleydson Master 11 -
1
votes1
answer56
viewsPosition search response on inputs
I’m doing a search on my BD and trying to position the results in some inputs, I can perform the search and get the data I need, but by positioning the result in my inputs they are getting tripled…
-
1
votes1
answer126
viewsI would like to know how I can make a select with every Friday of the year in mysql for example
I’m developing a calendar, and it will be used to schedule meetings. There are sectors, such as the T.I sector, which meets every Friday from 9:30 to 11:30, throughout the year. I need to somehow…
-
1
votes2
answers284
viewsScreen to configure Mysql connection
I am currently using the following code to run connections with my DB public class ConexaoDAO { public Connection getConexao() { try { return…
-
1
votes1
answer378
viewsError: Array to string Conversion - Select Multiple Laravel 5
In my View I have: <select multiple="multiple" name="carga_mental[]" class="form-control select2"> @foreach($cadastros->where('key', 'carga_mental') as $carga_mental) <option value="{{…
-
1
votes1
answer76
viewsHow can I put an if in this mysql search when no results return?
how to put an if and Else in this code for when the search in the database does not return any value? include_once("conexao.php"); $sql= "SELECT FROM tb_nome WHERE nome LIKE '$pesquisar%'"; $salvar…
-
1
votes2
answers167
viewsProblem with mysql_query, the data does not fall in the SQL database.
Hello, I cannot run this query, I echo this variable and all data is being passed, but it does not enter my BD. When I copy the command and paste it into the phpMyAdmin query works. Could someone…
-
1
votes2
answers129
viewsSearch frequency in Mysql tables
This is my question. The system (PHP) has 6 tables (Mysql) identical which are user participation in certain events. Each entry in the table is unique but the data can be repeated in the tables.…
-
1
votes1
answer615
viewsSearch by Range of coverage
I am programming a site and in the advanced search has the option of the user to do a search to find places close to the city he is. I have all the states and cities registered in the bank. But I…
-
1
votes1
answer62
viewsSQL function with mysql
I am implementing a function for a vendor search field and my sql function is in trouble, would anyone know what problem? This was a function of when using postgree, but now I’m using mysql. package…