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
votes1
answer81
viewsReturn PHP categories/subcategories records
I have the following structure of tables and records: CREATE TABLE IF NOT EXISTS `produto` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_categoria` text, `titulo` text, `referencia` text, `valor`…
-
0
votes1
answer150
viewsPost php array Insert mysql
I have a Javascript form that sends a array, however I am not able to recover the columns and their values of the array to insert into a Mysql database with PHP. Example of array…
-
0
votes0
answers77
viewsInsert doubt with while
I have this while that brings me all the vendors I want in an array, in which I can edit their name, my problem is that I want to make an index of these values in another table, but I have no idea…
-
0
votes2
answers26
viewsCheck field on the bank
I’m doing a search in the bank to see if the amount sent already exists in it. This is the function I’m using: function buscaSubdominio($conexao, $nome_subdominio){ $query = "select * from…
-
0
votes0
answers153
viewsWarning: mysqli_real_escape_string() expects Parameter 1 to be mysqli
I migrated the site from Ocaweb to hostgator and php are in different versions. Now I need to use mysqli. I’ve already arranged the /public_html/.../mysql.php. Now this file:…
-
0
votes1
answer80
viewsError when executing an INSERT in a view
I have this chart +---------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+---------------+------+-----+---------+-------+ |…
-
0
votes0
answers37
viewsVersioning data from a Mysql and PHP table
Hello, well, at first I have a table called projects. And I need to create versions of the data contained in it, because as THE DATA OF THIS TABLE goes through corrections, I need to show them to…
-
0
votes0
answers50
viewsSlotmachine Jquery Dynamic
I have the following Slotmachine: Use the API <div> <div id="casino1" class="slotMachine" style="margin-left: -65px;"> <div class="slot slot1"></div> <div class="slot…
-
0
votes1
answer89
viewsMysql/PHP - Compare two lists and filter information
This is a matter of ENEM (jokes aside, let’s doubt). The answer may be in Mysql or in PHP. I need to do a search where I list all permissions that the user does not have. For this I have the…
-
0
votes2
answers54
viewsHelp with Query Mysql
I have the following query: select profissionais_ab.cns cns_medico, profissionais_ab.cbo, unidade_ab.nome from profissionais_ab join unidade_ab on unidade_ab.id = profissionais_ab.unidade_id Return…
-
0
votes1
answer163
viewsCreate static page PHP page with mysql query
My project has a page. php that displays lists of various product categories, the page gets the category ID and lists the products, but each ID has more than 1 thousand results, and the page loading…
-
0
votes0
answers281
viewsReturn data with database formatting in a Textarea
Good evening, I am saving the data in the database correctly, IE in the database is recorded: <p style="text-align: center;"><strong>teste negrito</strong></p>…
-
0
votes1
answer107
viewsHow popular a select
I’d like to know how popular a select html with jquery, because I need to pull from the database, however, my file is . html and I am working with routes so have the views that are the files . html…
-
0
votes2
answers268
viewsReturn data via Ajax
Good morning everyone... I need a help... I need to return success or error values via ajax. But it is not returning anything. Follow the codes: HTML <div class="form-group col-md-4…
-
0
votes1
answer110
viewsI found this in my error logs, a hack attempt?
I found this in my error logs and security search, yet I’ll study, but maybe someone has seen? 1 attempt The codes were captured from a connection and taken from PHP’s GLOBAL $_SERVER with the…
-
0
votes2
answers51
viewsHow to publish mass posts via database
I’m creating an anime website. I’m wearing themeforest’s Betube Heme. I wanted to post several anime at once via bank, because posting one by one is going to be a lot of work. Currently when put it…
-
0
votes1
answer36
viewsQuery to retrieve information from a foreign key
I own a table that makes relationship between two foreign keys I would like to do a query where I would check the fk_user_1 and get the information from fk_user_2 I did that QUERY: SELECT…
-
0
votes0
answers32
viewsThere is a way to save an Araaylist<Food> in the MYSQL database
Here’s my situation: I’m putting together an app that indicates meals . So I have a table called food, which has as fields: idAlimento, name, measure For example: 1 , rice, 100 grams 2, feijao, 50…
-
0
votes2
answers1811
viewsI cannot access my Mysql Mariadb database
I’m on Linux Deepin 15.19 and installed for Web Development, however when I can’t create new databases by Mysql Worckbench say: Your Connection Attempt failed for user 'root' from your host to…
-
0
votes1
answer33
viewsLeft Join with Two Counts from the same table
Good people, I have a system that I made to make a pool with my friends. I want to select users and then count the right guesses and the wrong guesses. The database looks like this (I removed the…
-
0
votes0
answers306
viewsWhich is more performative: "WHERE id IN (?, ?, ...)" or "WHERE id = ? OR id = ? (...)"
I am not an expert in Mysql, but I am studying and lately I am trying to improve some codes of my programs and I came across this situation. I wonder if there are differences between the querys…
-
0
votes1
answer85
viewsError in Insert Entity Framekwork - Mysql
I am getting the following error while trying to perform Savechanges(): Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or…
-
0
votes1
answer45
viewsPHP - Not checking all elseif’s at the same time
Good, I’m creating a registration system with verification for testing to be implemented on a website. The problem is that the check assigns me an error due to multiple elseif in an if... can I only…
-
0
votes1
answer60
viewsPDO - Showing bank information
While trying to connect to Database without internet connection the program shows me this error message: Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Network is unreachable in…
-
0
votes0
answers425
views#1253 - COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'
Why if there is an INNER JOIN the QUERY returns the error #1253, but without INNER JOIN the QUERY returns the records correctly, both are ? The query is simple, so it works: SELECT a.* FROM…
-
0
votes1
answer373
viewsRemove partition from table
Using the mysql documentation, I created the partition based on a year field. ALTER TABLE minhatabela PARTITION BY HASH (ano_referencia) PARTITIONS 10 To make a possible rollback, how I would drop…
-
0
votes0
answers63
viewsPrimary key transfer to foreign key - PHP
I am having a problem entering data into my database. I have two connected tables, company and information. STRUCTURE OF THE COMPANY TABLE CREATE TABLE IF NOT EXISTS `empresa` ( `empresa_id` int(11)…
-
0
votes1
answer39
viewsNotice: Undefined variable: list_book
<form class="form" method="POST"action="processa_livro.php"> <table class="table table-bordered"> <thead> <tr> <th>Nome</th> <th>Autor</th>…
-
0
votes0
answers150
viewshow to make javascript take an n number of elements from a database
I would like to take for example all the names of a database table and save in an array(or matrix) and then list in an html table how can I create a new method BS: I have that part ready: var mysql…
-
0
votes1
answer322
viewsTake only one value in the query result to the database
I’d like him to pass one return with only the number of data of that table, however it is returning it: C:\E. S>node dao.js Connected! [ RowDataPacket { 'COUNT(*)': 4 } ] Code:…
-
0
votes2
answers2480
viewsReact JS + PHP help
Well I’m having difficulty and I haven’t found a solution yet, wanted to develop a crud using Reactjs + PHP + Mysql; I made a php file that returns a JSON object so I can access it from React.…
-
0
votes2
answers217
views -
0
votes1
answer1143
viewsHow to use except in mysql
I need to select one in an offer table and then use an except to delete the other select result Example: A = {10,11,12} B = {11,12} (A except B) = {10} I’m talking about except pq for what I had…
-
0
votes2
answers68
viewsdoubts regarding a dynamic select
My question is this, I have a table in the bank with the following specifications. ID | Produto | Qtdade | valor unitário de venda -------------------------------------- 1 | ABC | 5000 | 10 2 | ABC…
-
0
votes1
answer51
viewsValidation php only returns one value
My login validation is always returning the same value in my $Row variable. Follows the code: php connection. <?php define('HOST', '127.0.0.1'); define('USUARIO', 'root'); define('SENHA', '');…
-
0
votes1
answer31
viewsHow to register multiple
Good evening, I have a dynamic form that sends the following form: plano_nome: Unimed //nome do plano tipo_especializacao[]: protese // 1º tipo de especializaçao do plano plano_tratamento[]: Teste 1…
-
0
votes1
answer154
viewsReturn Json Mysql array
I have two tables inside in a database, and I need you to return the data in an array Today I have only return from the table tbl_categorias_photos The return and so on. [ { "id_cat_fotos": "3",…
-
0
votes1
answer64
viewsError inserting data into Mysql tables
When I insert the data into the tables the following error appears: ERROR CODE: 1265, data truncate for column 'genero' at Row 13 How do you fix this mistake? create database sf; use sf; create…
mysqlasked 5 years, 11 months ago user141036 -
0
votes0
answers91
views -
0
votes1
answer87
viewsError with AES_DECRYPT Mysql character and Codeigniter
Good afternoon guys. Would anyone like to help me find this mistake? I created a login area on the site, but I’m having trouble when the user uses in his password the exclamation character "!".…
-
0
votes1
answer145
viewsError while trying to create a Migration in the Laravel
I just created a new project in Laravel, but when creating a Migration, there is an error in the database. I have tried to create a new database or use an existing one, but the problem remains.…
-
0
votes1
answer39
viewsReceiving and Manipulating array with ajax
Good evening, I have a very big question. And I search via ajax the treatments of a certain plan, and according to each type of specialty he has to add an html. To see better follow the codes: Ajax:…
-
0
votes0
answers158
viewsDefault Schema in Mysql
I followed the installation indicated on website mysql. After that, I installed Workbench also by following the command indicated on the official website. In college use Windows in Labs and there…
-
0
votes1
answer58
viewsUse an html tag that is in a Mysql database on a page
I inserted the following direct tag into the bank <iframe width="962" height="541" src="https://www.youtube.com/embed/w2Ov5jzm3j8" frameborder="0" allow="accelerometer; autoplay; encrypted-media;…
-
0
votes1
answer46
viewsCompare difference between values of the same column, having to disregard the first and the last of the day
I’ve been racking my brain for a few days I need to do a query that brings up employee time records, but I have to ignore the first and last record of the day. In the example I would have to ignore…
mysqlasked 5 years, 11 months ago Celso Tavares 1 -
0
votes3
answers55
viewsSwitch between results
Hello! I have the following appointments: SELECT id, nome, idade, data_nascimento, cpf FROM internos WHERE cpf = '12345678911' and SELECT id, nome, idade, data_nascimento, cpf FROM externos WHERE…
-
0
votes2
answers87
viewsGenerico code for building mysql queries
Well, I need to build a generic code that builds a mysql query, I want to find out the best way to do it. Through a JSON I will send the information, it is they: "Group"(TAG, EMPRESA, CARRO);…
-
0
votes1
answer207
viewsCase When with Leftjoin
Can someone give me a hand, I’ve spent hours trying to make this query work: SELECT p.id as idPedido, p.*, i.*, e.*, f.*, m.id AS idEmpresa, m.razao_social, l.id AS idFilial, l.razao_social AS rsf,…
-
0
votes1
answer174
viewsSelect Distinct in only one of the tables
I have the following separate tables, A and B which I am placing next to each other to facilitate: +--------------+------------+-------------+ |ID Relacional | A | B |…
-
0
votes1
answer21
viewsProblem with printing data from an array
I have two Row and mailTeste arrays, one of them comes from my database and is already populated, within it has two Row["email"] and Row["id] I want to pass to my other array that will be used…