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
votes0
answers30
viewsSQL: I need my 2nd table with FK of the 1st automatically updated
I have a Sales_order table with Order Number and other information and created a table with FK of the 1st. I want every time a new order automatically falls in the 2nd (Requested) with the column…
-
-3
votes0
answers10
viewsSave files to Storage or Mysql Database?
Personal the question may be 'simple', but in the company where I work the analyst requested that PDF files be saved in bank (Mysql - using Mediumblob type). But in Windows I always save files(pdf,…
-
-3
votes2
answers621
viewsI am unable to send form data to mysql database
connection file <?php $servidor = "dsadasd.com.br"; $usuario = "ttt"; $senha = "ttt"; $dbname = "cadastro"; //Criar a conexao $conn = mysqli_connect($servidor, $usuario, $senha, $dbname);…
-
-3
votes1
answer90
viewsPass-through error by reference, insert into the bank
I’ve had the following mistakes: Notice: Only variables should be passed by Ference in /var/www/html/crud/bank/Banco.php on line 30 Notice: Only variables should be passed by Ference in…
-
-3
votes2
answers190
viewscheck difference between values with php
Needed help to check if the quantity chosen by the customer is different from the existing stock Code I am using $con=mysqli_connect('localhost', 'root', '', 'pap') or die (mysqli_error ());…
-
-3
votes1
answer2490
viewsParse error: syntax error, Unexpected '$error' (T_VARIABLE) in C: xampp htdocs HITSS register.php on line 26
I’m with the title error in my code, can someone give me a light? <?php $erro = array('1'); include("conexao.php"); if(isset($_POST['Entrar'])) { //1 - REGISTRO DOS DADOS if(!isset($_SESSION))…
-
-3
votes1
answer134
viewsMy SQL Error 1215: Cannot add Foreign key Constraint!
Well when I’m adding the references he gives this error, the error appears from the 3rd alter table what I do! create database tipoUber_bd; use tipoUber_bd; create table users( CPFUsuario char(11),…
-
-3
votes1
answer84
viewsERROR 500 - But I don’t know where is wrong, someone help me!
@PostMapping//Create public ResponseEntity<Categoria> criar(@RequestBody Categoria categoria, HttpServletResponse response) { Categoria categoriaSalva = categoriaRepository.save(categoria);…
-
-3
votes1
answer792
viewsVery slow MYSQL query, more than 25 seconds, how to improve?
I have a query in mysql that is very slow , more than 25 seconds. The base is quite large, around 1,000 records of real estate (table osrs_properties) and 16,000 photo records (table osrs_photos).…
-
-3
votes1
answer135
viewsConditional in Mysql clause
I have a select normal SELECT campos FROM tabela_Z WHERE condicoes I’d like that one query add a field that is another query. SELECT campo1, campo2, campo3, (SE houver o id X na TABELA _, = true,…
-
-3
votes2
answers936
viewsjava login screen and Mysql database
I am validating the login of a simple system but giving an error does not login I will send you the code of the class and the moment I try to log in. Lojabd class that validates the user class that…
-
-3
votes2
answers102
viewsHtml/php tables do not appear
I have this code, but the goal was when you click if you see, the table appears, the problem is that every time I click everything disappears, and does not create the table. If I remove the form it…
-
-3
votes2
answers74
views -
-3
votes1
answer221
viewsHow to send multiple files via AJAX and store them in the database?
I have a form in which I can send a single file, by a file field, and store it in the database. However, I need to be able to send more than one file through the form and store them in the database.…
-
-3
votes1
answer55
viewsIs there any way to separate this file and call by ids
Galera good morning I am working on a survey program in php, I need to separate the id of a question, example take the id of the first question and relate to the second. Example 1st question How you…
-
-3
votes1
answer123
viewsImplementation of the Java Mysql MVC model
In my model I am accessing Clientedo by the controller of my model Customer as seen in the example below. I would like to know if this practice is correct for the mvc model, since both classes…
-
-3
votes1
answer295
viewsdatabase query returning empty array
Hello, I have an appointment function at the bank. If the query returns 1 or more rows, the function returns an object (or a class), but if the query does not return any rows, the return is: Array (…
-
-3
votes1
answer63
viewsHow to ensure the Insert of all MYSQL data
I need to ensure that ALL data is entered, otherwise carry out a reversal and those that are entered are removed. I have the following case $dia1_entrada = $_POST['dia1_entrada']; $dia1_pausa_almoco…
-
-3
votes2
answers33
viewsError executing and showing deletion of an id in the database using PHP
I am having difficulty executing the deletion of a person in the Mysql database using ID, but it does not perform the deletion as the ID entered for deletion still remains in the database and does…
-
-3
votes1
answer161
viewsVerification of videos per user
I’m developing a website to show videos inserted by users. For that I did with you: $(document).ready(function () { var videoContainer_monitor = $("#video_monitor"); var codigoVideo_monitor =…
-
-3
votes1
answer970
viewsError with Hikaripool-1 spring
I have this error when I try to initialize my spring project. I can’t find anything to make it work. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \…
-
-3
votes1
answer30
viewsUndefined Property: Dateperiod::$format
I am making a system that registers a set of dates via $_POST. I want to insert in the database the range created below via datetime. But when executing appears the above message. How to proceed?…
-
-3
votes2
answers41
viewsphp and mysql not saved
I am making a simple registration in php and mysql only that it is not registering and playing in mysql I did a check in case of this error it returns repeated email , and this giving this message…
-
-3
votes1
answer40
viewsHow to fix the error ? Error happens when I am trying to insert data into the course table
CREATE TABLE TIPO ( CODIGO INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, -- Código interno (PK) TIPO VARCHAR(32) NOT NULL, -- Descrição PRIMARY KEY(CODIGO) -- Define o campo CODIGO como PK (Primary Key)…
-
-3
votes1
answer53
viewsReturn value from a PHP method
Well, I’d like to know how I return a variable out of the object by running a method in PHP. Follows the code: Connection.php <?php class Connection { protected $db_host; protected $db_user;…
-
-3
votes1
answer41
viewsMysql connects but does not display keys
Good morning my code returns this error Fatal error: Uncaught Error: Call to Undefined Function mysql_query() in /home2/minhap26/public_html/pages/lists.php:8 Stack trace: #0…
-
-3
votes1
answer365
viewsGet Mysql name, middle name, and last name of records
How can I cut the name of a string coming from Mysql to get name, middle name and last name, I’m trying and I’m not getting, what I have so far is this, but I need the middle name and middle name to…
mysqlasked 4 years, 2 months ago adventistapr 5,498 -
-3
votes1
answer29
viewsQuery output in mysql grouping
I need help for a query grouped in mysql. Can anyone help me? Tables CREATE TABLE `tb_tree` ( `idtree` int(255) NOT NULL, `idrec` varchar(255) NOT NULL, `idusrec` varchar(255) NOT NULL, `idreg`…
-
-3
votes1
answer136
views -
-3
votes3
answers42
viewsHow to count records in more than one table?
I have these 3 tables: I want to mount a SELECT that counts the number of records for each of them. SELECT COUNT(client.idClient) AS clientQuantity, COUNT(clientVehicle.idClientVehicle) AS…
-
-3
votes2
answers56
viewsSolved - Save more than one array in Mysql
I’m getting arrays and would like to save them in the database mysql and I’m not getting it, could you help me? Follow what I’m getting and how I’d like it to stay: $nomemorador =…
-
-3
votes2
answers65
viewsData editing in PHP
Hello, I have a problem in my code that I did not find the problem. When trying to edit the ID 1750 it runs but saved in ID 0, I wonder if my code has any error in this sense, why by clicking edit…
-
-3
votes1
answer28
viewsHow to organize a Mysql table efficiently and scalably?
I am doing a refactoring in a system that has several with many tables that have many columns, that is, up to 148 columns in a table, how to refactor such table? This is the table CREATE TABLE…
-
-3
votes0
answers14
viewsFunctions in Mysql phpMyAdmin
I’m trying to do the following exercise 1 - Develop a Function that returns the name of the liquidator by passing as parameter the identifier of the liquidator. Then use the created Function to…
-
-3
votes1
answer23
viewsPROCEDURE ERROR PERFORMS ONLY ONCE AFTER GOING MYSQL CONDITION
I have a problem in my past, the scenario is that I have null and not null values that are primary key fields, I am making a Datawarehouse. As all these values need to be calculated, when running…
-
-4
votes1
answer161
viewsWhat is the essence to model a system?
Due to my idleness in the internship and lack of knowledge to work in even medium-sized projects I am looking for a mission that makes me increase my knowledge both in PHP (mainly) and in databases…
-
-4
votes1
answer1371
viewsEdit a news page
In the code below, I have the news editor. <?php /* * faz a conexao ao banco * e seleciona a base de dados */ include ('../conn/conn.php'); /* * monta e executa consulta em SQL */ $sql = "SELECT…
-
-4
votes1
answer167
viewsFailed to create login system
I’m making a PHP login system that checks two conditions. 1st If wrong login or password has been entered; 2nd If the direct URL has been typed. The first check is correct. I’m having trouble in the…
-
-4
votes2
answers2364
views -
-4
votes1
answer137
viewsSQL query for date return
I can’t seem to solve this comic book exercise. Ask to use the sql date function. We have the date in day/month/year format, we have to extract the month. We have the seller table containing…
-
-4
votes1
answer150
viewsmysql medium time, top 10 templates
Personal as illustrated in my table below, I would like to get the following data: Time the POST spent from DATA_ENTRADA to DATA_SAÍDA Overall average time that all STATIONS take from DATA_ENTRADA…
-
-4
votes2
answers558
viewsReal-time database verification script
I wanted to make a script, where the page appeared: "Loading.", "Loading."" Loading...". The 3 loadings would change constantly and when to insert a result into the banco de dados loading would…
-
-4
votes1
answer1182
viewsHow to make a simple shopping system?
Example: I have a product with 10 units registered in a database, a customer buys 1 unit, this unit gives low and product quantity goes to 9 units. How to express this in PHP?
-
-4
votes1
answer2003
viewsERP system with PHP
I was hired to create an ERP system for a company. The system would be Web, hosted in the cloud, developed with PHP, MYSQL and Javascript. In addition to all registration screens, data…
-
-4
votes2
answers669
viewsHow do I let a php application run on the client’s pc even if the server connection goes down?
Rectifying the previous question, I inform you that my idea is to let the customer navigate between application pages, perform records locally, and recover that data when the connection…
-
-4
votes1
answer1226
viewsUpdate does not give error but does not update in the database
Why don’t you do UPDATE in the database? The code does not give error but does not update. <?php elseif ($op === "atualizar") { //Atualizar arquivos $id = $_POST["id"]; $nome =…
-
-4
votes1
answer373
viewsError running mysql_query
This is my line 17 programming: $result = mysql_query($localhost, "SELECT *FROM **nome do meu banco**") or die (mysql_error()); This is the mistake I can’t make: Warning: mysql_query() expects…
-
-4
votes2
answers240
viewsAssociation of categories in PHP and MYSQL
I am developing a site that has items, an item can have more than one category, how do I link these categories with this single product?
mysqlasked 8 years, 2 months ago Lucas Lima 21 -
-4
votes1
answer15542
viewsError "Warning: mysqli_query() expects Parameter 1 to be mysqli, null Given"
I am developing a PHP API, which is hosted on Hostinger. However, when I do the SQL query on Mysqli, I get the same error no matter what changes I make to the code: Warning: mysqli_query() expects…
-
-4
votes1
answer86
viewsHow can I do the foreach correctly
Good morning, how can I do this foreach correctly, because I’m not getting to do UPDATE in the tables dependent, dependent, dependent, date-dependent, planodependent, accommodating, codependent and…