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
votes3
answers80
viewsDisplay only one message at the end of an operation within a WHILE
I have a situation. I do a search in a table and from the returned data, insert in a new table and update the current one. Ex: $busca = $link->prepare("SELECT valor FROM tabela1 WHERE funcionario…
-
1
votes1
answer199
viewsI read in alphabetical order
how to do this li list from the lowest date to the highest? <div class="cal1"></div> <? $inicio = date('Y').'-01-01'; $fim = date('Y').'-12-31'; $iniciomes = date('Y-m').'-01';…
-
1
votes3
answers505
viewsRun Mysql command when starting the system
Other commands I managed to execute when Boot in the OS normally in these two ways: 1 - Creating a file .sh in the briefcase /etc/init.d/ and put the command inside. 2 - Placing at the end of the…
-
1
votes0
answers334
viewsError 1452 mysql: foreign key error
I created two product tables to tbl_produto and the tbl_adiciona, so instead of every time I want to update the stock, I don’t have two equal data in the product table, but in an outside table.…
-
1
votes1
answer33
viewsProblem in select
How to solve this? create table tbl_prescricao( id_prescricao int not null primary key auto_increment, tipo_prescricao varchar(250) not null, valor_prescricao decimal(10,2) ); create table…
mysqlasked 7 years, 2 months ago Guilherme Nicaretta 15 -
1
votes2
answers491
viewsLogin system with permission
I have a login system that, if the user is an administrator, will be redirected to one page and if common, to another. The table: For this, I have a column in the table that stores active call…
-
1
votes1
answer114
viewsCreate BD via PHP => Access Denied!
I’m trying to create a BD via PHP script, but is returning ACCESS DENIED. <?php $dbhost = 'localhost'; $dbuser = 'usuario_root'; $dbpass = 'senha_root'; $conn = new mysqli($dbhost, $dbuser,…
-
1
votes1
answer250
viewsInsert ID from one table into another
I’ve seen other posts but they don’t meet my need, I’m making the mistake that only looks for the first person table ID and not what is inside the field, example: I have the ID 6700 inside the input…
-
1
votes1
answer355
viewsError in sql-Insert command when passing a variable as parameter (python 3)
I am trying to pass my "table" variable to the mysql command, but it is returning an error (of sql) during execution. What am I missing? Here I created the table variable table = input('Table name:…
-
1
votes2
answers331
viewsPrint a sum in the view
In the Mysql Workbench the result comes out, but how to print in View? Errorexception Array to string Conversion public function listadepontos() { $id = auth()->user()->id; $somas =…
-
1
votes3
answers529
viewsLogin with validation system
In my system login, if the user has registered id and password the access is released. So far so good, but now I want to qualify this user in administrator(1) or simple user(0) to, when they log in,…
-
1
votes1
answer80
viewsVariable stay rounding and spoil calculation
I have the following SELECT: SET @peso := 0; SET @ganho := 0; SELECT @peso := (SELECT SUM(peso)/1000 FROM entrada WHERE entrada_id = A.entrada_id)+@ganho AS peso, @peso, @ganho := (SELECT…
-
1
votes1
answer1227
viewsFatal error: Call to Undefined method mysqli_result::fetch_all()
My code was working correctly on the localhost, but when I went up to my web page, the following error appeared: Fatal error: Call to Undefined method mysqli_result::fetch_all() in This is the…
-
1
votes0
answers34
viewsPerformance in somatic database
I have a system in development but are already using in beta, this system has as specific focus: 'control 100% of shares, action by action, without losing any history how it was and how it is now'…
mysqlasked 7 years, 1 month ago AnthraxisBR 4,361 -
1
votes0
answers78
viewsPath to upload with variable
I’m looking to use a "changeable" upload path. I made a bidding system, that each new bidding, is created a folder with the name of the same where will be uploaded the files related to it using…
-
1
votes2
answers130
viewsError in Javascript
Could someone tell me how to JOIN to fill the data automatically from the description field. Accuses this error Notice: Trying to get property of non-object in…
-
1
votes4
answers1139
viewsHow to get last login of each user using mysql?
I have the following table: CREATE TABLE `adm_historico_acesso` ( `id` int(10) UNSIGNED NOT NULL, `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `ip` varchar(100) NOT NULL, `usuario`…
mysqlasked 7 years, 1 month ago Rafael Meirim 321 -
1
votes1
answer35
viewsSelect record that contains result equivalent to a variable
I have a column in my mysql table, in which it is called "positions", where several values in int are placed there, however, with the "|" of division. Example: 8|19|10|20| And each number represents…
-
1
votes1
answer32
viewsResult after update
Hello I would like after an execution in the database return me a value 1, for example I have the function in php: function registrar_pagamento( $pago, $registro ){ require_once…
-
1
votes1
answer1393
viewsres.json Nodejs/ Express
I have a cruel doubt in nodejs/ Express, I am very new in language but what I need is to pass the id in a route to execute and return a query. I’m wanting to do in fragmented files, so I have a…
-
1
votes2
answers257
viewsbreak date in 3 columns in a mysql query
I have a system where I need to select any date in a calendar, so I need to return all the month records of that date, for example: I have 4 dates, 01/08/2017, 06/08/2017, 14/09/2017, 17/10/2017.…
-
1
votes1
answer678
viewsSum of quantity multiplied by product value in daily sales
I have an order page, let’s take as a base a mercantil, where the person buys 3 sodas each with the value of R $ 6,00 and 2 cookies in the value of R $ 2,00 each. First I need to multiply these…
-
1
votes2
answers63
viewsOptimization of database model
I’m making a system for a college and one of the subsystems that I’m building is the student report card. I put for when creating a new discipline in the "discipline" table this discipline is added…
-
1
votes2
answers135
viewsError comparing PHP-Mysql dates
I have the following code: HTML: <input name="dataInicio" type="text" class="form-control datepicker" placeholder="Data" maxlength="10" autocomplete="off" /> <input name="dataFim"…
-
1
votes1
answer1145
viewsExpress return post
Good afternoon, I am having a problem in the return of POST on express, I wanted to register users using the following code : router.post('/user', (req,res,next) =>{ var obj =…
-
1
votes0
answers753
viewsHow to use Eloquent without losing performance (51.39%) in Lumen 5.4?
Developing an API that should handle a high performance website. Doing some tests I verified that the use of Eloquent is downloading the performance of the requests in the database Mysql in 51.39%…
-
1
votes0
answers105
viewsError in SQL Phpmyadmin execution
I am trying to include records by Phpmyadmin, but it is returning a strange error as excerpt below: Error #1054 - Unknown column '€ F’' in 'field list' Query: INSERT INTO `pe_orclinhas`…
-
1
votes2
answers749
viewsIf there is any data in mysql do a PHP/Mysql update
Guys, I imagine this doubt is recurring. I even looked for some alternatives but did not work. I have a Screen where I record Service Orders with Client and PC data from it. It turns out that. I am…
-
1
votes2
answers35
viewsSelect multiple tables by sorting by date
mysql> SELECT * FROM COLABORADOR; +----+----------+ | ID | NOME | +----+----------+ | 2 | FULANO 2 | | 3 | FULANO 3 | +----+----------+ 2 rows in set (0.00 sec) mysql> SELECT * FROM JORNADA;…
-
1
votes1
answer75
viewsHow to pass data from two unrelated tables in a view?
I’m trying to move to a view, data from two unrelated tables. Appear only the data of one, the other, They are invisible, but you can notice the change in the layout when these data are loaded.…
-
1
votes0
answers312
viewsReturn radio button value
Although you have set the field default value to "N" in Mysql, when using radio button in the form, if it is not selected, the record comes as null. How to make the entered record, in which the…
-
1
votes3
answers3053
viewsInserting current date in php
I am trying to enter the current date as the person registers but I did not want the user to inform this data but rather to enter it through some function with mysql, to save the date the provider…
-
1
votes0
answers45
viewsCreating table schema with pre defined Keywords
Hello, I am creating a table scheme that needs to be well optimized, the reason for that will be tables that will have 3 to 5 million records. The big concern here is with regard to the search, in…
-
1
votes2
answers663
viewsHow can I differentiate a 'NULL' string from a null fact value?
I made this example for you to understand how the query is being made in the bank in my system. $sql = "SELECT * FROM tabela"; $result = $conn->query($sql); if ($result->num_rows > 0) {…
-
1
votes2
answers79
viewsMake selection from the results obtained from it
Good afternoon, I have the following table.. *eventos* ---------------------------------------- | id_evento | id_projeto | nome_evento | ---------------------------------------- I need to make a…
-
1
votes2
answers29
viewsOnline error of the form
In the browser of the following error, I have tried everything if you can help Parse error: syntax error, Unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in…
-
1
votes0
answers106
viewsHow to make two querys in a JSON?
I’m mounting a map using the mapbox API, creating some points dynamically on the map. I have a JSON that gives me some information (getDados.php), but I wanted to perform one more query inside this…
-
1
votes1
answer177
viewsselect part of the JSON that was filtered in Where
In the database I have a field called resources, in it I save the permissions of a user, in Json format: [ { "rota":"reserva", "sref":"oQueFazer", "ordem":"1", "recursos":[ "index", "show", "store",…
-
1
votes2
answers109
viewsSearch filter that does not filter
So, I have a page with a search form for the user to select what will appear in his table. When the user clicks on the Submit button, another page should appear with the table properly filtered.…
-
1
votes1
answer587
viewsInsert JSON file into database via PHP
I have a JSON file that I need to do the Insert of the information contained in it in the database. JSON file:…
-
1
votes0
answers694
viewsHow to show and hide bookmarks in Google Maps with Mysql?
I made a site with Google Maps that used each position of an array for each marker... var map; var markers = []; function initMap() { var uluru = {lat: -23.9651447, lng: -46.3838347}; map = new…
-
1
votes1
answer339
viewsSelect Group with PHP
I’m trying to feed a select group with database data, but it’s not working. Someone can see the error? <div class="form-group"> <select class="" name="agencia" tabindex="-1" style="height:…
-
1
votes0
answers22
viewsFailed to display Longblob content on site
Guys I’m making a site for a tcc of high school and good did in php a while that would pull data from a table including photo(stored as longblob), and good at the time of running this code on the…
-
1
votes0
answers280
viewsDoubts regarding loading combobox in c# with Mysql database
good afternoon, I would like to know how I can fill a combo box C# with data from a table in Mysql. I am making an application for a jewelry store, and I would like to know how I can fill the…
-
1
votes1
answer557
viewsEdit status of multiple records with checkbox marked?
I need to send an array with the id of the records that have the checkbox checked, to edit the status field at once. Note1: All records will undergo the same change listed in a select. Note 2: I can…
-
1
votes1
answer64
viewserror when creating simple like button
I’m trying to create a simple button like that simply adds +1 in a table in the col like, ignoring that you can click more than once and that is subject to invasion because it is only a test. The…
-
1
votes1
answer36
viewsHelp with ajax to send new variable value in emsma page without refresh via radio button
I’m trying to make a table with radio that when I click, changes the order that is displayed the table content, I saw that the way to do this is with ajax, but I do not have much time left, and from…
-
1
votes1
answer31
viewsHelp - Logic Formulation - SQL, PHP, HTML
I have a table in the bank with team registration, where each line corresponds to an employee and their respective team. For example, id_staff, employee 1, Mario 1, Sergio 2, John 2, Joseph I want…
-
1
votes2
answers538
viewsDifferent mysqli_fetch array output than the one running in phpmyadmin
I have the following php code that queries the database and returns a vector with the data. public function executeSelect($query){ $resultado_id = mysqli_query($this->objetoConexao, $query);…
-
1
votes2
answers1722
viewsSelect and delete duplicate records by last update date?
Among the fields in the table there is the name field, the dt_add field which is the date that the record was inserted and dt_update which is the date of the last update of the record. I would like…