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
votes3
answers1088
viewsHow to select Mysql using input date type with php?
I’m trying to list certain database columns by date but it doesn’t work. Follows excerpt from the code: <?php if($_GET['busca'] == "data") { $datai = date('Y/m/d', strtotime($_POST['data']));…
-
0
votes1
answer20
viewsMigrations from my Django app are not applied
I created the models.py file in my app, created all the models, added appConfig to INSTALLED_APPS but when I use the manage.py migrate myapp it does not make any changes to the mysql database: Can…
-
0
votes1
answer41
viewsHow to fix the following error: Array to string Conversion?
I’m trying to extrair os dados de quantidade de produtos from a table but I’m not getting. I’ve tried using the Foreach but it didn’t work. Also some way to remove data from table other than by…
-
0
votes2
answers80
viewsProblem with SQL query
I’m trying to make a query but return me the values selected in a select and I can’t because it returns all the entered values. Can someone please help me? <form id="form1" name="form1"…
-
0
votes1
answer742
viewsDelete record button does not work
I have a query page that shows the entries made in the bank through a form and a button with the option to delete. Page of the consultation: <h1 style=" text-align: center; height: 7; margin-top:…
-
0
votes1
answer38
viewsRemove columns with Null from Datagridview
I already used "IS NOT NULL" in Query’s Select, but it removes the entire row and in this case, I would like to remove the column only. This table has more than 70 columns and Null Fields may vary,…
-
0
votes0
answers6
viewsField select generate sql query and fill input field
Hello. Good afternoon. I have a form where there is a select field that brings dynamic values from a mysql database to select users. I would like when an item is selected in this field, through an…
-
0
votes2
answers7832
viewsHow to make a search filter
I have a query page that shows in table form the records registered in the bank through a form. Considering that there’s going to be a point where the system is going to have a lot of criminal…
-
0
votes0
answers12
viewsFormatting of DATA SQL
How can I know what causes this ? 2021-07-27T12:08:25.863Z, the serious ideal the select back 2021-05-17 10:26:10
-
0
votes1
answer105
viewsQuery with duplicate data in Mysqli
Hello. I’m having trouble displaying results of a bank consultation. I have 2 tables Tabela 1 - logs // logs do sistema //user_id = são os usuários administrativos do sistema //user_perfil = é o…
-
0
votes1
answer343
viewsSQL - Delete records that have a field with the same value as another, only when there is more than one record
I have a product bar code table, I want to delete only those bar codes that are the same as the product code and that have another code besides this one. Table: CodProduto CodBarra 01 01 < não…
-
0
votes1
answer185
viewsError to the popular SELECT - Warning: mysql_fetch_array() expects Parameter 1 to be Resource
I’m not getting popular my select. Follow my code below: <select> <option>Selecione</option> <?php while($serv = mysql_fetch_array(getAllServicos())) { ?> <option…
-
0
votes1
answer34
viewsJavascript snippet does not work
I don’t know what I’m doing wrong, maybe I can even be simple, but it doesn’t give me the expected result When creating the html component: <li class="dropdown notifications-menu"> <a…
-
0
votes2
answers1036
viewsMake an SQL query with codeigniter
I’d like to pull some information from my database called "website", inside it would connect to the table: "posts" and in it wanted to show the information as: "id, updated, title, Description,…
-
0
votes0
answers13
viewsSQL Mysql - Need to add the data_today and the data_qui1month
Well, I’m making a site that when the person creates a request, show the data_today that would be in the database using SQL NOW(); that I know and how do I add a data_finalize for example in 1…
-
0
votes1
answer101
viewsDo not connect on Panel (Codeigniter)
Good evening guys, I made a script for content management but when I put my data does not connect, just refreshes the page and stays in the same place, I put a command to error but not even that.…
-
0
votes0
answers212
viewsTurning rows into columns
I would like to turn some table values into columns. The structure of the table would be basically this: | id | idUnidade | mesCompetencia | valor | |----|-----------|----------------|-------| | 1 |…
mysqlasked 7 years, 3 months ago Rafael Withoeft 2,287 -
0
votes1
answer45
viewsHow to make foreign table associate fields using select?
In my project I have a function in which searches all the elements of the database and still makes "categoria_id" become "categoria_nome" ordering the field in another table, but when I try to use…
-
0
votes1
answer32
viewsHow to delete a column from multiple tables in Mysql?
I have a database of over 100 tables, and I would like to find some way to delete a specific column that all tables have in common. Is there any way? If so, how? I tried to run the following…
mysqlasked 3 years, 2 months ago Fábio Augusto Rodrigues 13 -
0
votes1
answer33
viewsIn mysql it is possible to create an extra line if 2 or more lines are equal
Hello I wonder if it is possible to create a fourth line for mysql based on the Titles that repeat as in the first table where the game The Witcher\1743: Wild Hunt repeats 3 times and is already…
-
0
votes1
answer52
viewsI do not receive SELECT FROM data
I’m making a simple login system but I never get a real line where $sql = "SELECT * FROM $this->table WHERE 'email' = :email AND 'senha' = :senha"; But the email and password are correct, PHP…
-
0
votes1
answer79
viewsHow to maintain a constant connection to the database for updating data without the need to refresh
I have an application that is working with Mysql and PHP databases. There is data in this comic that are updated frequently because it is a vote, but this vote takes place on an external site and on…
-
0
votes1
answer108
viewsWrite multiple records from one table to another with php
I have two tables, a scale with schedules and a related one called agenda. tabela escala id_escala hr_inicio tabela agenda id_agenda id_escala hr_agendamento I want to record in the hr_schedule…
-
0
votes1
answer2633
viewsUncaught Error: Call to Undefined Function mysql_connect()
I made the creation of an html form accompanying a connection file and receiving data from this form (in php), however, when clicking on the input that calls the action receives, I get the following…
-
0
votes0
answers144
viewsFailure accentuation XML to mysql
I’m facing a strange mistake with accentuation. I set my database, table and structure to UTF-8. Utilise: header('Content-Type: text/html; charset=utf-8'); mysql_query("SET NAMES 'utf8'");…
-
0
votes1
answer623
viewsHow to update multiple records at once? PHP+MYSQL
TABLE SIZE: ID | NOME | PRECO 1 | 06x08 | 0.00 2 | 08x10 | 0.00 3 | 09x12 | 0.00 4 | 11x14 | 0.00 5 | 13x18 | 0.00 6 | 18x24 | 0.00 I need to update the prices... how do I do it using UPDATE with…
-
0
votes1
answer69
viewsIncrement even if delete record
I have the following problem, I have the following function: public function codigo_denuncia() { $db = new mysql(); //pegar as linhas do ano $ultimoRegisto = $db->executar("SELECT id FROM…
-
0
votes2
answers244
viewsCheck for 3-condition registration with PHP
I am new to PHP and I am trying to check if there is equal record in the database before registering, but until then everything right, the problem is that I can not check with 3 conditions in WHERE…
-
0
votes2
answers593
viewsHow to model the products table for an e-commerce?
I have a question about how to model the table Produto of a small e-commerce I’m doing. I have been seeing some e-commerces and came across the following situation: mm same product can have…
-
0
votes2
answers312
viewsSubtract a day directly from CURRENT_DATE
I am using a framework that allows me to set the current date as default value, but now I need to show the user always the date yesterday, the code snippet as the value set is this: $editor = new…
-
0
votes1
answer1395
viewsSave date and time in database
I wonder if there is how I save the date and time of my system to be able to save in the database, I would not like to create a "created_em" and add the time in the database, what I want to do is…
-
0
votes1
answer2801
viewsMYSQLI - Trying to get Property of non-object in
I have the following function: function sql_update_views ($table = null, $id = null) { $database = open_database(); $found = null; try { $sql = "UPDATE ".$table." SET views = views + 1 WHERE id =…
-
0
votes1
answer889
viewsHow to dropdown to import database options
I have a form for enrollment of students and one for enrollment of these students in classes. To enroll the student in the class, I would like to have a dropdown in which I could select one of the…
-
0
votes2
answers1579
viewsHow to import database data into form field
I have a course management system where the user has access to a table with all classes of all courses and chooses to enroll in a. When the user is going to register, will open a form with the…
-
0
votes0
answers41
viewsReturn data from a function?
How can I return data from a function, in case I want to do a foreach of an sql query that is in a function: index php. <?php require_once "funcs/functions.php"; $userdata = get_user_data();…
-
0
votes1
answer350
viewsInvalid SQL (INNER JOIN) indenter error
Select a list of employees who have changed positions or departments (job_history), the list must contain the employee’s registration and name, the name of the department and position that worked,…
-
0
votes1
answer51
viewsDatabase with many changes
Situation I’m making a system for a drug store. The Customer can enter the pharmacy and pick up products only from the gonad and pass directly to the cashier, or can pass the counter and pick up…
-
0
votes1
answer226
viewsHow to make a Join of 2 tables and where 2 fields of table A refer to the same field of table B?
I have the command SQL that doesn’t work: SELECT GAT_requisicao.id_GATrequisicao as 'ID Requisição', GAP_atendimento.id_GAPatendimento as 'ID Atendimento', GR_paciente.nome_GRpaciente as 'Nome…
-
0
votes0
answers113
viewsGenerate dynamic Mysql header
I have below a problem that I am not able to solve. How to make the header have the name of the employee and below it the revenue that was generated according to the date? And what would an HTML…
-
0
votes0
answers662
views -
0
votes1
answer44
viewsMany zeros in the modal
I created a test modal in an attempt to return the id value to the view and as there are more than 5000 records in the query, I don’t know what happens.. but prints a million zeros in the modal,…
-
0
votes2
answers85
viewsGet date-ref from different buttons
I created a system where displays data from a table mysqlthrough the plugin datable. One of the output data is a modal. The javascript code takes the data-ref, that contain the id. This id will be…
-
0
votes2
answers544
viewsOn-demand paging with PHP POST button and method using PDO
I looked at some sites and saw some things about it, but I’m not getting the logic behind the page on demand. jQuery(document).ready(function(){ jQuery('#btnpaginas').click(function(){ var dados =…
-
0
votes1
answer302
viewsProblem running SELECT in a phpmyadmin table
I have several tables in my database, and until recently, there was no problem in any of them. I was able to manage the entire bank smoothly by Phpmyadmin. But suddenly in one of the tables the…
-
0
votes1
answer66
viewsHow to put two records from one table into another as one in select Mysql Database
How to put two records from one table into another as one in select Mysql Database? SELECT TURMA.turma_id, TURMA.turma_nome, PROF.prof_name from turma TURMA LEFT JOIN professor_materia PROF_MAT ON…
-
0
votes1
answer1755
viewsUncaught Error: Call to Undefined Function mysql_query()
I am doing my login system and is giving the following error when logging in: Fatal error: Uncaught Error: Call to Undefined Function mysql_query() thrown in D: xampp htdocs login.php on line 41 if…
-
0
votes0
answers189
viewsMYSQL does not start after Update version 5.5 to 5.7 on Centos 6.9 server
I am updating Mysql 5.5 to MYSQL 5.7 on Centos 6 server, but after the update the server does not start. I carried out the removal process of version 5.5 of MYSQL to perform update as indicated in…
-
0
votes1
answer37
viewsError after 100 AJAX requests
I have the function below that makes a request every second to the Mysql database and updates a DIV on the page. But after about 100 requests the "THINK ME" database blocks and returns "An error…
-
0
votes0
answers99
viewsRefactoring a database using VIEWS
I have the task of refactoring a database and would like to know if VIEWs are viable for the task. My strategy is to create a VIEW imitating the new structure of the supposed table, at least the…
-
0
votes1
answer54
viewsConnection error mysql_query
#include <mysql/mysql.h> #include <iostream> MYSQL connection; void data_insert(); int main(){ mysql_init(&connection);…