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
-
0
votes2
answers74
viewsError in search system with php
I am creating a user search system on my website. However I am facing the following error: This is the code I’m using: <body> <h2>Resultados da tua pesquisa</h2><br />…
-
0
votes1
answer110
viewsPHP and Mysql: base64_decode inside SELECT
Hello, I have an INSERT that registers in the bank with base64_encode(), working perfectly. "INSERT INTO Atendimento_Campo_Prontuario ( acpr_id, acpr_apro_id, acpr_valor ) VALUES ( :acprn_id,…
-
0
votes1
answer73
viewsUpdate via another table - Mysql
I have the following problem: I have a table rev_tasks which contains id as key, and a second table rev_reviews and has as a foreign key task_id, pointing to the task, in addition I have a field…
-
0
votes2
answers33
viewsHow to locate the data of the respective month
I would like to know how to get only the data of the respective month in which we are. For example: I have the date 2017-05-10 and I have the date 2017-11-05, how do I take data only from a date…
-
0
votes1
answer32
viewsQuery to count how many fields equal to 0 a record has
I need to return how many fields equal to 0 each record has and rank the one with the most zeros down. Example: id | col2 | col3 | col4 1 | 1 | 0 | 0 2 | 0 | 0 | 0 3 | 0 | 1 | 4 4 | 0 | 3 | 5 5 | 3…
-
0
votes0
answers361
viewsPHP Mysql connection performance on remote server
I am at all costs trying to improve the loading time of my pages, however I am suffering with a bottleneck. The connection between the web server(godaddy) and my database server(local with dedicated…
-
0
votes1
answer80
viewsMysql query with mixed ORDER BY?
My doubt is a little boring to explain but I’ll try to make it as simple as possible. I have the following tables in a Mysql database: produto, preco, preco_produto (many mapping to many), venda and…
-
0
votes1
answer145
viewsCatch local time with JS, save to Mysql, show with PHP
I’m taking the local time with Javascript in the view, and sending it to the database. The database is storing this date and time as text. The date and time thus arrives in the database, e.g.: Sun…
-
0
votes1
answer512
viewsHow to do an INNER JOIN by bringing specific fields from two tables and removing the repeated records and with a max condition?
Well, I have the following tables: Table 01: And table 02: There I would like to bring only all fields with higher points and do not repeat the waiter in the case, how to do?…
-
0
votes1
answer211
viewsDynamically add sql query value in variable
I have a table (employees), where I want to take the value of id_funcao, id_percentage and put in this variable $percentage. Not only do I want to put the 30%, but the values of the Percentage…
-
0
votes1
answer101
viewsForeign key with more than 1 value
I’m working on the construction of my TCC and a problem has arisen. I have a schedule table, and this table needs to store some data, among them, the activities that will be spent during the year.…
-
0
votes1
answer26
viewsRelation between tables of the same values in the columns
I want to make an sql query that relates two columns of two different tables, which store the same types of values, but one has some that the other does not contain, example: Table 1 owns the code…
-
0
votes0
answers48
viewsTrigger in MYSQL to delete record when it exceeds a date
Hello how could I create a Trigger that deletes records from the database that exceed the current system date?
-
0
votes3
answers1885
viewsSelect different values in two tables - SQL and PHP
I have two tables to pedido_tb and the pedido_grade, what I want to do is compare, the values of the column "request" of the requested table and column "n_pedido" of pedido_grade, basically, would…
-
0
votes2
answers743
viewsUPDATE in all records, changing autoincrement number
I have about 500 records in the database, with autoincrement in a table starting at 900,901,902 onwards, would have like to do an UPDATE on all records starting the autoincrement at number 502? Then…
mysqlasked 7 years ago William Alvares 384 -
0
votes0
answers52
viewsTransform the rows of a column - SQL
Someone help me with the following question. Generate ".sql" extension file with script that transforms the lines of a column in a variable string, with its values separated by commas, for example:…
-
0
votes1
answer97
viewsDatabase log in Laravel 5.4?
I caught a project in progress but still do not know very well the Laravel, and I’m trying to save the data in the database using this code in controller: public function store(Request $request) {…
-
0
votes0
answers158
viewsMysql query problem (subquery) difference between MYSQL versions.
I have a problem in a MYSQL query, I think it is different from versions of MYSQL, my client’s database is on hostgator (Database client version: libmysql - 5.1.73 / Server version: 5.6.30 - Mysql…
-
0
votes1
answer25
viewsGet Only Registry Ranking Number in One Query
There’s a way I can get the ranking of a record in the table only with a Query (even if I have a Subquery) ? For example, I did it below: SELECT a.id_concessionaria, a.avscore, @rank := @rank + 1 AS…
mysqlasked 8 years, 4 months ago Diego Souza 16,524 -
0
votes0
answers360
viewsSynchronize Mysql and SQL SERVER via PHP script
I need to synchronize SQL Server (Master) with Mysql (Slave). I have already found some ways to do this on the internet, such as the native feature of SQL Server "Linked Server" or that APP for…
-
0
votes0
answers18
viewsUpdate table field even if input is set
I have a table in the database and am normally running insert, delete, update, select operations. During a test I was running an update of a field with the same information that is set in the…
-
0
votes1
answer20
viewsCreate only one and not several modals
Well guys I have a registration system and in the part of updating the user data he generates me a modal, but the page is getting heavy because there are many records and each record has a modal, as…
-
0
votes0
answers416
viewsSum PHP and Mysql hours
I picked up a project in progress, a tracking system that has workweek calculation. The system calculates right, but sometimes adding up time of the stationary vehicle and walking sum 24 hours and…
-
0
votes2
answers981
viewsPHP/Mysql - Switching from localhost to online hosting
I created a website with PHP and a Mysql database using XAMPP. Now I’d like to put the site online on a host, I have to change the connection to the database where it says localhost? What procedures…
-
0
votes2
answers62
viewsWHERE SQL functions
I have the following query: $qrysel = "select * from won_auctions w left join registration r on w.userid=r.id where xxx; This query will show a list of users of the table won_auctions and take the…
-
0
votes1
answer432
viewsCan I connect a Cordova app directly to Mysql?
I want to make a system with local mysql server on a desktop, but without using PHP or ASP. Then android would make the direct connection. Is it possible? Thank you.
-
0
votes2
answers275
viewsPHP returns NULL when information has accents
When I want to display the data returned by a JSON, it returns to me NULL. Only when the database information is without accents, it returns me normally: <?php include_once 'WSAps_conexao.php';…
-
0
votes1
answer37
viewsproblem when connecting to database
Warning: mysqli_select_db() expects Parameter 1 to be mysqli, string Given in C: xampp htdocs lojavirtual conecta.php on line 3 Could not connect
-
0
votes0
answers42
viewsHow to manipulate the values of the curtime
Good morning, I need to make a comparison between a time that is saved in a table and the current time of the database, I am using the curtime(), but in the hosting I am using the hour is 2 hours…
mysqlasked 7 years ago Andre Cabral 11 -
0
votes1
answer281
viewsInform the user that the registration already exists
I have a code to register the user on my site, he sees that the user is already registered and does not enter again in the table, but I can not inform the user that the registration already exists.…
-
0
votes1
answer59
viewsDoubt to build Mysql query
In my system I have the following tables: tb_partida(id, data_hora, flag_ativo, tb_cotacao_id, tb_campeonato_id), tb_campeonato(id, nome_camp, tb_pais_id) e **tb_pais**(id, nome_pais,…
-
0
votes2
answers2451
viewsSave the result of select in a variable and use this variable to fill the input that will then be used to do an UPDATE in the same table
I am trying to recover the data from a table inside an input where the user can be updated and save in the same table through UPDATE. I managed to do the UPDATE, but edit the data by input and send,…
-
0
votes1
answer44
viewsHow to use a website on the server
So, I created a php system that saves the numbers among other things of the employees of the company, I use xampp on my computer, I wanted to know how I do to put the system in php on the server and…
-
0
votes1
answer74
viewsImport featured images without having to download them. - WORDPRESS
I’m working on a website that has news since 2001. I would like to export only your ( posts + featured images) from 2015 backwards, but I don’t need to download the images so I imagine everything is…
-
0
votes0
answers49
viewsMake Insert with select
I have a table called label, with nameTag varchar and Quant int 11. When I insert in the label table, I have to increase the total quantity registered in the bank +1. But I don’t know how to do this…
-
0
votes2
answers74
viewsNon-specific search filter
I have a page with a search filter with the options "service", "state" and "city" and a Ubmit button that redirects to the page where a table will appear with already filtered entries. But currently…
-
0
votes2
answers2956
viewsError inserting Data into Mysql
I have this query to insert a data into the database: INSERT INTO `bancoTeste`.`TabelaTeste` (`t_id`,`t_label`, `t_parametro`, `t_valor`, `t_descricao`, `t_valores_padrao`, `t_tipo`) VALUES…
-
0
votes0
answers192
views -
0
votes0
answers94
viewsHow to view saved photo in database?
Guys, how do I view saved photos in my database? I intend to do as a gallery that has the option for the administrator to delete the photo or add a new one when you want.
-
0
votes1
answer49
viewsHow to create a Rigger After Update
I need to create a Trigger that performs an update in column A of table T, as soon as column B of that table is updated. So I think I need to create an After Update. But from what I understand, it’s…
-
0
votes2
answers129
viewsName as number in Array foreach
I have this foreach below that lists results of a Select, I would like to name according to the number, as I did below in IF, but it hasn’t worked yet.. foreach($result as $row) { $segurado[] =…
-
0
votes3
answers428
viewsFullcalendar remember every month
I am working with Fullcalendar plugin with PHP and Mysql. I need to make a reminder remember every month, for example, remember every day 5 a payment. I already googled and could not find.
-
0
votes3
answers41
viewsCount sql results in table with or without values
I have a table subcategorias and I have another anuncios, where it has the id of the subcategory. I need to search all subcategories and return together, by subcategory, the amount of ads it has,…
-
0
votes1
answer222
viewsLARAVEL - Loss after running the MIGRATE command
Monday I inserted a new migrate into a project, where a new table was created. After running the commands in the local environment and everything works, I updated the git of the production server…
-
0
votes0
answers297
viewsRequest select returning null value
Good afternoon, I’m having trouble getting the value of a select in the following form: {{Form::open(array('action' => 'FilterController@EstatisticaEsic', 'class' => 'form-filter'))}} <div…
-
0
votes0
answers46
viewsSort by value outside the Mysql query
I need to sort the result of my search by a value that is outside the query. For example, in the query I have a field called answer and with this value I make a calculation. But the result of that…
-
0
votes1
answer546
viewsCan a foreign key be part of more than one table?
I wonder if I can put a foreign key in more than one table, for example, where the entity "competitors" in the image is a table and the attribute "id_competitor" is a primary key, and the other…
-
0
votes1
answer119
viewsDismember variable, taking part of the text
I have a multiple select that saves the following format in the database: 1-Azul,2-Verde,3-Vermelho,4-Preto,5-Branco Now I need to dismember this variable to show the result, but I need to remove…
-
0
votes1
answer241
viewsInsert with SQLSTATE error [HY093]
I am making a form to save data in the database and this error Erro SQLSTATE [HY093] <?PHP $nome = $_REQUEST['Nome']; $cpf = $_REQUEST['CPF']; $sexo = $_REQUEST['Sexo']; $datanasc =…
-
0
votes2
answers104
viewsSql file or direct in the database
Today a question came to me, I was creating a table in the database and I found out if I should do it manually, directly in the database or create this table through queries, creating a page .sql.…