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
votes1
answer75
viewsHow many tables will you need in Mysql?
I’m starting a project that aims to manage students' grades and subjects. The information I’ll need to store is: Total subjects (All subjects the student will need to study) Current materials (These…
-
-1
votes1
answer223
viewsHTML5 and PHP form all on the same page
How to process these tasks before the form is saved to the database? CASE 01: How to prevent the boss not be repeated in the visitor? CASE 02: How to determine winner or draw? CASE 03: Determined…
-
-1
votes1
answer32
viewsPagination error while removing number displayed in link
**The pagination works perfectly, but when I do the following case: I change the pagination everything in good, it gives me a url parameter equal to: localhost/index.php? page=1 if I remove the…
-
-1
votes2
answers70
viewsWhat’s the fastest way?
I made a little game in Java and the players' dice are in the database, when a player enters, he is placed in a ArrayList<PlayerData> where it contains the getters and setters of level, money…
-
-1
votes2
answers212
viewsmysqli_prepare() expects Exactly 2 Parameters, 1 Given
Hello, I am developing a local system here for the store where I work and I have the following problem of the title when importing data to the bank. Follow the codes: User class <?php class…
-
-1
votes1
answer24
viewsLogin with mysql always gives error Not Found - 404
I am creating a login and constantly gives the page error not found. I have here the code: <?php //iniciar sessão session_start(); include('includes/config.php'); $LoginErro = "Não existe…
-
-1
votes1
answer66
viewsSql, sum of several
Hello, I have a bank with 3 important tables, state,city and orders need to rank the states than have more requests to q have less but the orders are related only to city table. so I need to make a…
-
-1
votes1
answer899
viewsLARAVEL - Error when connecting MYSQL with LARADOCK in Workspace
When I try to run the command on the laradock’s Workspace php artisan migrate the following error occurs: Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested…
-
-1
votes2
answers919
viewsExchanging column values in Mysql
I have a Mysql table with coordinates, the column names are X and Y. Now I want to change the column values in this table, so that X become Y and Y become X. The most apparent solution would be to…
-
-1
votes2
answers47
viewsHow do Insert in the bank for forms on the same page?
I’m testing a form before I put it into production, because we already have a system that inserts asset movement 1 to 1 and I’m willing to make the operator can do several at the same time, for…
-
-1
votes1
answer68
viewsView all records in a column
made a query where I got the result of this query, however what I need is this result displays only one line, a single record but in reality you more than one: follow the code below and please show…
-
-1
votes1
answer54
viewsHow to reduce this PHP/MYSQL function by adding data in multiple columns?
Hello, I have a private variable $group_permissions which stores all columns of permissions, they columns have the value false or true, to tell if the user has permission to run some on the panel.…
-
-1
votes1
answer35
viewsHow to update an image name in the database?
This my script is to insert the name of the image in the bank, is working normally INSERT.PHP if ($_POST){ $imagem = $_FILES['img_post']; $nomeImg = $imagem['name']; $tmpImg = $imagem['tmp_name'];…
-
-1
votes1
answer406
viewsPHP Insert image in Xampp Mysql database
I’m trying to put an image in the bank MySql via PHP, actually the path of it, after moving the picture to a folder at the root. I’m using xampp. All the codes I have tested normally enter the other…
-
-1
votes1
answer55
viewsWhere is the error? I can’t pull table from database!
function getUserAccessRoleByID($id) { global $conn; $query = "select user_role from tbl_user_role where id = ".$id; $rs = mysqli_query($conn,$query); $row =…
-
-1
votes2
answers124
viewsHow to verify that the email is already registered in the database?
The Controller is always returning the error message, when the email is registered or not in the database. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include =…
-
-1
votes1
answer81
viewsDoes my SQL Query not work properly?
I have a system that uses dates for registration and I separate the date by a explode formed by arrays and record them in a database, but when I do the query that searches them by order, the order…
-
-1
votes1
answer653
viewsInsert into two separate tables
I have two tables (cliente and telefone), I need to insert the name in the table cliente and the customer’s phone in the table telefone, at the same time, by the same form. In the HTML form I…
-
-1
votes2
answers1029
viewsConsult two tables without foreign key and relationship
I have two tables tb_pedido and tb_pagamento, put an example below with some dummy data. I need a report that shows the data of tb_pedido and of tb_pagamento, all in a single table as in example 3.…
-
-1
votes1
answer49
viewsCounter button with Update
I’m having trouble making a javascript button to perform an update without refreshing the page, at the moment it is not entering in the bank and is doing refresh hehehe in index.php <form>…
-
-1
votes2
answers501
viewsIs it possible to run 2 queries at the same time in Mysql? Stored Procedure
I need to create a stored procedure to update the salaries of employees who earn less than 1000 and give a 10% increase. Other employees (who earn over 1000) will have 15% reduction. I did the…
-
-1
votes2
answers542
viewsInsert multiple records into Mysql using NODEJS
How do I add multiple records at once in Mysql by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END…
-
-1
votes1
answer1299
viewsProcedure in Mysql to clone products, Using CURSOR FOR SELECT
I need to clone the data from an EST_PROD_PRECO_CUSTO_EMPRESA table of id x company for the same table but of the company with id y. in Pl/Sql I did so. DECLARE CURSOR v_precos IS SELECT ID_PRODUTO,…
-
-1
votes1
answer224
viewsMerge two tables with PHP and recover the data in the same html select element
I’m trying to list in the same element select of html the results of the consultation of different tables, but I’m not getting. Follow down the code so someone can tell me where I’m going wrong.…
-
-1
votes1
answer626
viewsTreat error when connecting to Mysql with PDO
People would like to treat the error that occurs if the Mysql server is not running, I want only one message to appear so I made the following code: function mensagemErro () { throw new…
-
-1
votes1
answer184
viewsCan you help me?
I am with a project to be done, the project itself consists of creating an sql script based on entity model and relationship, the booklet itself is not very well formulated and based on what I…
-
-1
votes2
answers70
viewsSQL + Medium Query
Gentlemen, I have an appointment that makes the calculation by line. The result is in the field calculo_diff. Calculation is the difference DataHoraTerno,as shown below: Now I need to make an…
-
-1
votes1
answer23
viewsError recording information in the data bank
Hello, I just started learning php and mysql. At the moment I’m trying to make a kind of posting system, but I’m not able to record the information in DB. If you can help me find what’s wrong, it’ll…
-
-1
votes1
answer87
viewsLaravel Mysql - display the amount of records in a Join query
I have the following query: $empresas = DB::table('empresas') ->join('departamentos', 'empresas.id', '=', 'departamentos.empresas_id') ->join('eventos', 'eventos.departamentos_empresas_id',…
-
-1
votes1
answer198
viewsSub query between two mysql tables, for each row a set
It is the following I have a table in mysql in which it keeps the name of the students and in this same table it has a column that keeps the code of the class in which the student is enrolled, I…
-
-1
votes2
answers88
viewssend 2 variables by url
Sending 2 variáveis for url: var http = false; http = new XMLHttpRequest(); function carrega(){ var nome = document.getElementById('CodigoUtente').value; var nomes =…
-
-1
votes2
answers212
viewsPHP percentage calculation and save to Database
I’m trying to make a calculation before sending to the database: <?php session_start(); require_once 'config/init.php'; require 'config/check.php'; ?> <?php require 'config/conexao.php';…
-
-1
votes3
answers112
viewsPrevent user from registering 3 times in the same week
I am developing a system for scheduling reservations of locations and equipment for users registered in this system, which in case are teachers, reserve such items for their classes: the teacher…
-
-1
votes1
answer113
viewsPDO Bindvalue - Array Where
Good afternoon. I am creating a form where the user selects some fields to formulate a query and thus generate an sql to be executed and returned. After validating the fields, I create a…
-
-1
votes1
answer114
viewsSQL MIXING EVERYTHING
I have the following query above as per the image. Why is she mixing the fields? SELECT celulasreunioes.idCelula, celulas.nome, celulas.idRede, redes.nome, celulas.idRegiao, regioes.nome,…
-
-1
votes1
answer61
viewsI need a select that if the result is 0 or null it does not display the button
Hello need that if there is no link in the link column of the table the button does not display, the code in xampp works but in the hosting is not going I do not know why, the button displays and…
-
-1
votes1
answer121
viewsDisplay result of different tables with similar data - MYSQL
I have never done this, I need to create a QUERY for MYSQL to display data from two tables, a table of the male gender and another of the female gender. I know that the correct thing is to create a…
-
-1
votes1
answer57
viewsError 403 in Android project with Webservice using Wampserver
After implementing Webservice in my project and using Debug to check if everything is right, it returned me the same error 403 is in the image. After searching about, I confirmed that the app’s…
-
-1
votes1
answer309
viewsMysql update only one line field
In Myssql I have a table like this: I receive in a PHP via POST id of the table and which photo I must clean from the database: id= 1 foto = aaa.jpg With UPDATE need to leave the table like this:…
-
-1
votes1
answer96
viewsCopy data from a new Mysql record
I have a small problem trying to get a new record to be included in another table, ie: I have a table-A in the bank with the columns: id | nome | email | tel | campanha in table-B I have the…
-
-1
votes2
answers225
viewsKeep while information in variable
I have a code where you have a while within another, to be able to list products within the shopping cart divided by stores. Logo, to see listed the products, as in image 1. As in the picture above,…
-
-1
votes1
answer71
viewsHow to order query in MYSQL by relevance? (first results that the term is in the title, then in the content)
I have a table as follows: id|nota|titulo |ingredientes 1 | 3 |pão de batata|batata;farinha;agua;ovo 2 | 2 |bacalhoada |bacalhau;batata;pimentão 3 | 1 |batata frita |batata When I do a search that…
-
-1
votes1
answer75
viewsAsynchronous mysql queries in nodejs
Hello, I have a code in nodejs with mysql database. on one of the paths referring to the path(path) need to fetch all readings from 3 sensors (each sensor is a table) that have the path field equal…
-
-1
votes3
answers2084
views -
-1
votes1
answer810
viewsSearch date and time range PHP MYSQL
Assuming there is an ex date range: 2019-02-22 and 2019-02-26 I need to search the database by date and time (I need to extract the value by specific date and time, for example only from 05:00 to…
-
-1
votes1
answer962
viewsHow to compare two Python data frames
Hello guys I am trying to automate a loading process with python bringing data from sql and sending to a mysql table and I am facing some problems. Problem: I need that when I have new data in my…
-
-1
votes1
answer58
viewsRunning time (Calculating dates) - Coming from the Databank
Someone could help me find what is wrong when calling the date of the database in the function, I am also attaching a print: On the left the actual value of the last access and on the right would be…
-
-1
votes1
answer46
viewsDoes not show category
My blog is showing the post normally, minus the category part. I don’t know what else to do to fix this problem. Could someone please give me a little push? $resultado = mysql_query($consulta,…
-
-1
votes1
answer28
viewsI would like a help, I did all the registration and login procedure and it’s working
I would like a help, I have done all the registration and login procedure and it is working, but I login with email and return me the email(user) on the screen when I login is "hello, [email protected]"…
-
-1
votes2
answers223
viewsData insertion error : String data, right truncated: 1406
I am trying to save Checklist data from protocol, but the following error is occurring at the time of saving: The expectation is that this happens: In the description of the error it says that the…