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
-
-3
votes1
answer128
viewsSelect multiple movie categories
Good, I come across the following puzzle (for me) which is the following, I sincerely know how to start doing what I want which is varios checkbox's each with its own value. Then I really don’t know…
-
-3
votes1
answer1033
viewsPull results from two Mysql tables with PHP class
I created a class for dynamic generation of tables with results coming from Mysql. The syntax I use after instantiating the class is as follows: $table->topo('Menu:','menu','menu');…
-
-3
votes1
answer154
viewsHow to recover elements from another table in an SQL query?
I took data from a table wp_posts and now I need to get data from the table wp_postmeta which coincide with the ID captured in the table wp_posts. These data are the product_img1, product_img2,…
-
-3
votes1
answer305
viewsSingle user registration and password converting mysql_* to PDO
I need to update a legacy code and for that I need to make two modifications to it. The first change is to leave office mysql_* and use the PDO. The second is to update the database so that I can…
-
-3
votes2
answers193
viewsInsert in Mysql does not run
I’m having problems with SQL when making a small insertion in DB. I have a table with 4 fields: id_match -> int id_usuario1 -> int id_usuario2 -> int situation -> varchar(5) When I do…
-
-3
votes1
answer121
viewsLink counter - no external page, using JS onClick() or other solution in PHP + Mysql
Hello, I seek help to assemble a link counter. I would not like to use a collection page but rather a solution that runs on any page. Example on a page with 03 links: link01.php, link02.php (which…
-
-3
votes1
answer429
viewsUpdate with Multidimensional Array
I’m having a terrible problem, I can’t update mysql via PDO, with array that comes from some form fields. I’ve tried a lot and so far I can’t update. The array comes in this format. Array ( [id]…
-
-3
votes3
answers8281
viewsHow to delete structure and data from mysql database
How to perform a complete deletion of a database structure mysql? I need to delete all the entidades, tabelas, procedures, I want to keep only the name of the database, without any table or data or…
-
-3
votes1
answer923
viewsIntegrity Constraint Violation: 1062 Duplicate entry
SQLSTATE[23000]: Integrity Constraint Violation: 1062 Duplicate entry '202-564' for key 'UNQ_CATALOG_PRODUCT_SUPER_ATTRIBUTE_PRODUCT_ID_ATTRIBUTE_ID', query was: INSERT INTO…
-
-3
votes2
answers232
viewsWhat is the best way to create tables with users who may have multiple emails?
What is the best way to create the email table, as the client may have several emails, I created two situations one email and another email? what is the best way taking into account processing,…
-
-3
votes2
answers543
viewsProblems with php characters, with utf-8. How to solve?
I created a php table that returns MYSQL data in phpadmin, but the information returned in the table is coming like this: "Mine the Data and Simulate the" Note the question that comes in place of…
-
-3
votes2
answers79
viewsUPDATE SET in a record
Guys I have a table that lists records in the database and in front of each record has a button like this <a href="index.php?mod=pedidos&funcao=editar&id=<?=$lnped['protocolo']?>"…
-
-3
votes2
answers1008
viewsHow to send javascript data to mysql
I’m only having a little difficulty , because the data is going only to the same table ,type and a part is duplicated . Well it’s all the code the query, the form and the javascript . <?php…
-
-3
votes2
answers943
viewsMysql Error 1215: Cannot add Foreign key Constraint
-- 1 -- create database clinica; use clinica; -- 2 -- create table ambulatorio( idnroa int(15) unsigned not null auto_increment, andar int(15) not null, capacidade smallint(45) not null, primary key…
-
-3
votes1
answer272
viewsMultiple Inserts Inner Join PDO
Hello, I have in DB the tables categoria and imagens Currently Function (in PHP) to insert in the category table is similar to this (same title only): public function insere($ttitulo) { try { $stmt…
-
-3
votes1
answer1134
viewsUPDATE in two tables
I’d like to make one update using a Inner Join. I tried this: UPDATE m SET m.rua = 'Rua Major Gote', b.desc_bairro = 'Centro', m.id_tipo = '', m.numero = '652', m.CEP = '38700001', m.cidade = 'Patos…
-
-3
votes2
answers59
viewsWhile does not validate last php array
Does anyone know why the button of the last while record does not perform the form action? <?php while($dados_tabela = $consulta_tabela -> fetchObject()) { ?> <tr> <td><?php…
-
-3
votes1
answer110
viewsSelect does not work Mysql
I’m trying to make the following select select nm_login,ds_Senha from tb_funcionario where cd_funcionario=? Only if the field ds_status is the same as admin I want you to ignore cd_funcionario=?, to…
mysqlasked 6 years, 10 months ago William Cabral 3 -
-3
votes1
answer350
viewsMake choice via BD table combobox to insert data
Exemplifying: Choosing in options in which of table of the Database you want insert your information. <!--- EXE: Banco de Dados CREATE TABLE tabela_acao, tabela_comedia, tabela_ficcao( id INT(6)…
-
-3
votes1
answer39
viewsTake 1 record per date, without repeating the date
I have a box system where every time the box is opened and closed every day is recorded on the table, the box is opened and closed several times a day, however I would like to catch only the first…
-
-3
votes1
answer357
viewsPass a subquery of the FROM clause to the WHERE clause
I have the following query with a subquery in the clause FROM and I intend to get the same result but using this subquery in the clause WHERE. SELECT base.nome as Aquario, base.localizacao,…
-
-3
votes1
answer119
viewsWhat does it mean in PHP when mysqli_num_rows returns -1?
In a query to Mysql the return of the result brings the value of -1, what does this mean? I know that 0 is when it does not bring any results.
-
-3
votes2
answers39
viewsPass an array to another format
The array is coming in this database format: array (size=12) 0 => array (size=3) 'maquinas' => string '111' (length=3) 'mes' => string '1' (length=1) 'YEAR(data_ordem)' => string '2016'…
-
-3
votes1
answer64
viewsError when displaying the sum in a SELECT
I’m not getting the total amount. View Bench Values that are in the bank: R$ 70,88 R$ 70,88 R$ 70,88 Value that appears R$ 210 Value that has to appear R$ 212,64 Code <?php $numerocontrato =…
-
-3
votes2
answers4144
viewsHow to create a secure login system connected to the database in Laravel 5.3?
I have a project in laveral 5.3 that I am building an administration. I already have the whole database structure created. I now want to login with fields username and password. You won’t have a…
-
-3
votes1
answer77
viewsHow to use select in a table that is not related?
I need to build an SQL query that lists the amount payable for each km, quantity of km used and the total amount payable by each lease It is an exercise of SELECT and Inner/left Join but do not know…
-
-3
votes1
answer50
viewsValues in PHP search
I have the following arguments: //passo o valor para a variavel sómente se o get existir $valor_pesquisar = isset($_GET['pesquisar'])?isset($_GET['pesquisar']):''; if(!isset($_GET['pesquisar'])){…
-
-3
votes2
answers120
viewsError running mysql_query
When I execute the mysql_query it gives the following error(even if I manage to connect to the database without major problems) Warning: mysql_query(): Access denied for user ''@'localhost' (using…
-
-3
votes1
answer40
views -
-3
votes1
answer59
viewsI need an SQL query to only return one data,
For example, I have a table, with 2 columns, Name and Letter. The table Name, the respective names are inserted, and the table letter, only accepts 3 letters, A, B and C. The same name can have all…
-
-3
votes1
answer26
viewsSearch Filter for some reason is not looking for the product
<?php include ('conecta.php'); ?> <table width="753" height="191" border="0"> <tr align="center" valign="middle"> <td bgcolor='#FFFFCC' colspan='5'…
-
-3
votes1
answer122
viewsInsert ID into another field of the same table at the time of INSERT
I’m in the following situation, I’ve been searching the net and found similar aids but not what I really need to know and I don’t even know if it’s possible! Come on! There would be some way for me…
-
-3
votes1
answer179
viewsCheck whether person is of legal age, if yes delete it
I need to make a query in MYSQL database to verify if a user is of age based on their date of birth compared to the current date. If yes the user should be deleted from the database.
-
-3
votes1
answer1329
viewsError Code: 1064. MYSQL WORKBENCH
Hello I’m trying to create the following table: CREATE TABLE produtos( id integer primary key auto_increment unique , nome varchar(255) unique, descricao varchar(255), preco varchar(10,2) , validade…
-
-3
votes1
answer188
viewsProcessing of units of measurement in the database
In a project I will have units of measurement gram/unit/liter. Not that a product I can sell it by gram and liter, if entered 10kg of meat I will give output 10kg of meat how should I treat it? I…
-
-3
votes1
answer725
viewsHow to create a python code and connect it to Mysql
Eae Galera, I’m learning the database language, but I still don’t know everything to the letter so I came here to ask you for help to know how I can do this. I know there is sqlite3 in python but I…
-
-3
votes2
answers81
viewsHow to use WHERE function in column created from a query?
select a.campo1, b.campo1,replace(replace(b.campo1,'-',''),'.','') as resultado from dbo.tabela1 a, dbo.tabela2 b where a.campo1 = resultado I am trying to select above, but it displays error…
-
-3
votes2
answers193
viewsI was given this exercise: "ALL CUSTOMERS WHO BOUGHT MORE THAN R$ 200,00 LAST MONTH"
SELECT clientes.nome,clientes.sexo, SUM(pedidos.valor_pedidos) AS total_gasto,clientes.cidade FROM clientes INNER JOIN pedidos ON clientes.id_clientes = pedidos.id_clientes WHERE sexo LIKE 'F%' AND…
-
-3
votes2
answers162
viewsMYSQL - How to return records that exist in one table and do not exist in another?
I have the npsparticipantes table that receives the id that comes from the contracts table. How do I recover all contracts that are not added to the npsparticipantes table?…
-
-3
votes1
answer80
viewsIs it possible to connect PHP to an old version of mysql server (3.23)?
I’m doing this: $conexao = mysql_connect($servidor, $usuario, $senha, $db); if (!$conexao) { die('Não conectou: '.mysql_error()); } echo "Conectou"; And the error message is this: Connecting to…
-
-3
votes1
answer737
viewsProblem in Xampp
i am having trouble starting apache in Xampp when start hit appears the message sequinte: This may be due to a blocked door, lack of dependencies, 18:17:44 [Apache] improper privileges, a failure or…
-
-3
votes1
answer51
viewsWordpress can not download plugin Updraftplus
I was downloading the wordpress plugins but when I went to download Updraftplus gave the error sequinte: https://downloads.wordpress.org/plugin/updraftplus.1.16.23.zip… By unpacking the package...…
-
-3
votes1
answer35
viewsCheck if ip is already registered in the database
The code lowers checks if the user’s ip is already registered in the database, but it keeps sending the information that the ip is free, even though it is already registered in the database. $ip =…
-
-3
votes1
answer963
viewsAdvanced PHP search
I have a table called vehicle registration with the following fields: id_cadastro, id_user, status, estado_veiculo, tipo_cadastro, fabricante_veiculo, modelo_veiculo, ano_fabricacao, ano_modelo,…
-
-3
votes1
answer32
viewsWhat is the best way to store user registration date in the mysql database ? should I use now()? unix_timestamp()?
I was using this code to do this but it doesn’t seem to work! besides when I ask the best way is thinking of the possible difficulties I will have in the future as I am beginner should probably…
mysqlasked 3 years, 8 months ago Felipe Nascimento 3 -
-3
votes2
answers26
viewsJoin Mysql Tables with similar field names
I have the following tables: client : id_client, name, surname, birth date house : id_casa, house, fk_cliente, fk_bairro car : id_car, model, fk_customer neighborhood: id_bairro, name I want to…
-
-3
votes1
answer35
viewsRun an instruction in mysql of birth date calculation and update the age column
I have a column called data_nasc and another age column, but wanted every time the system loaded this instruction into Mysql and updated the age field of all records. So far it works, but the result…
mysqlasked 3 years, 4 months ago Mark Damon 1 -
-3
votes0
answers17
viewsSQL Catch 5 Records for 3 SQL Tables
Make a query in SQL with the tables cl_usuario, cl_loja and cl_cidade and return only 5 records with the names of the users, their cities, the names of the stores that are linked and date the user…
mysqlasked 3 years, 3 months ago Mayara Chagas 1 -
-3
votes1
answer43
viewsHow to insert emojis into Mysql database and return the same in current service
I have a messaging system. Where the client (Whatsapp) sends an emoji, and my system receives the emoji. But when the page is updated and searches the emoji in the BD to display, the emoji is…
-
-3
votes0
answers15
viewsbest way to store user profile images
What is the best way to store a user’s profile image? using python, flask, mysql. I am developing a user registration system and want to store profile photos, I saw that storing the image itself in…