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
answer312
views -
1
votes2
answers1041
viewsLoad client data into a PHP modal
Hello, I have a problem developing a page that reports a list of clients. In the main screen appear the fields ID, Name and CPF. In addition, on the same line, the "View" button appears, which…
-
1
votes1
answer75
viewsHow to make an insert in mysql with data coming from a Simpledataset
I have a Simpledataset with data from a Firebird local. I have to make one Insert in the Mysql. How should I do it? Other Sqlconnect and another Simpledataset? How to do the Insert with data from…
-
1
votes1
answer323
viewsCompare codeigniter array fields
Good night! I am exporting reports, in my form are sent via $_POST the fields that the user wants to export, I receive and assign to a variable all fields. I need to compare these fields with the…
-
1
votes2
answers3086
viewsTake Mysql data with PHP and move to Javascript
I am trying to use jquery to make an auto complete in my search field. The connection to the bank is correct and I use the following code to save the files: <?php INCLUDE "conexao.php"; $sql =…
-
1
votes1
answer455
viewsINNER JOIN Group Very slow in consultation
I have a select in mysql that is taking too long to return the records, I noticed that it occurs after the table gets fuller. This select makes 4 INNER JOINS and takes the last record of each id…
-
1
votes1
answer794
viewsReference collections in mongodb
I have a model of an airport in mysql and I intend to upload it to mongodb via links between collections. In the following images are examples of documents from my collections. (Airplane, Airport…
-
1
votes3
answers2199
viewsOffline and online PHP application
I wanted to know if it is possible and, if so, which technologies I can use to create an application that runs offline and when the user has connected to the net, the data is taken to the server…
-
1
votes1
answer77
views"top" with MAX in mysql
I need to make a query that returns the 3 highest salaries of civil servants, per state. example that should return: fulano 850 RJ ciclano 800 RJ beltrano 700 RJ joao 1000 SP maria 900 SP pedro 200…
-
1
votes2
answers141
viewsDoubt about mysql - Save, Update and Show data
Talk guys! I have a question. I created a static page that will show some data. For example, I want to show you the live score of a specific football game. I thought of creating a static page with:…
-
1
votes2
answers141
viewsSELECT in 2 Mysql tables with PHP
I have a question when giving a select, because I have 3 tables, they are professionals, experiences, address. Let’s say I have a professional and this professional has more than 2 experiences.…
-
1
votes2
answers80
viewsQuery Between Mysql does not return correct!
I have a simple consultation in a field Datetime, I must make the consultation stating two dates, of course recovering the values between them. select financ_conta_id, financ_conta_cadastro from…
-
1
votes1
answer46
viewsSaving users in BD
Good morning. I have a login and registration system via PHP, with Mysql database. In this database I have a table with login, password, name and other user details. When implementing Facebook…
-
1
votes2
answers274
viewsUse ID generated from one FORM in another and UPDATE in bd
I recorded this image in the database generated me the ID:20. Form to save : INICIAL.PHP (Code to save image) <html> <head> <title></title> </head> <body>…
-
1
votes2
answers234
viewsTrigger that accumulates the Mysql result
Considering the following tables: Gambler( id; name number. ) j equipe_ficticia( id; user name; name; dot_fictitious; ) Ef equipe_ficticia_player( id; equipeFicticiaId; pilotoId; ) efj step( id;…
-
1
votes2
answers3374
viewsModify foreign key for auto-increment
I have two tables in my bank membro, membro_grupo, grupo The table grupo has a column called id_grupo which is the primary key in this table. The table membro has a column called id_membro which is…
-
1
votes0
answers50
viewsHow to make separate sorts in tables with Left Join?
I need the following help from you. First, see below my current query: sq1 = mysqli($conexao,"select * from tabela1 TBL1 left join tabela2 TBL2 ON TBL1.codigo=TBL2.codigoestrangeiro LEFT JOIN…
-
1
votes1
answer114
viewsBank related creation
I am doubtful whether or not I am doing the right thing in setting up this bank. They could help if the way is right or wrong. For now I just put id in the tables. Gang Turma | Turmaid A 1 B 2 C 3 D…
-
1
votes1
answer77
viewsI can’t carry fields
This is my screen <h:panelGrid columns="6"> <h:outputText value="Nome: * " /> <p:inputText id="nome" value="#{funcionarioController.funcionario.nome}" size="18" maxlength="80"…
-
1
votes1
answer101
viewsQuery changing Join - Sequelizejs
How could you do this query using Sequelize? SELECT t1.* FROM Table1 t1 inner join Table2 t2 on t1.id != t2.t1_id
-
1
votes1
answer73
viewsQuery to return only the records of the last 24h (Codeigniter)
Hello I needed to do a query that returns the values of only the last 24h i have the following query: $date = date("Y-m-d H:i:s"); $this->db->select('*'); $this->db->from('inscricoes');…
-
1
votes2
answers994
viewsHow to also treat accented strings and without accents in a LIKE
I’m performing a query where I need to search the data based on the first letter of a string, for example. Accessories; select * from tabela where column LIKE 'a%' However, if I pass some lyrics…
-
1
votes0
answers506
viewsSave image together with form to database by PHP
Good afternoon guys, help me please, I found a tutorial on the internet that teaches you to save the image in the database with php and jquery, but it teaches send only the image I’ve tried every…
-
1
votes2
answers1305
viewsUsing the soundex mysql function with like parameter
How can I use the soundex function of mysql as a like parameter for example I have a table people with the name Poliana Mendes Silva I want to search with soundex all the "polys" of the bank…
-
1
votes0
answers41
viewsSearching for equal data on different dates
I would like to know how I can bring some BD data. As for example client name, ID and date. In the company I work there are Service Orders, but some of these OS are of equal clients(same client but…
-
1
votes1
answer332
viewsMysql database structure
Hello I need a small force to structure my data in a database. I have a table for exam procedures with an id, test name and value. Only the problem is that a "procedure" may contain other…
-
1
votes0
answers1033
viewsHow to do mysql php image update
Guys have this code and need to update the image that is already saved in the database, but it error, Undefined index: photo and file_get_contents(): Filename cannot be Empty Code <?php require…
-
1
votes1
answer117
viewsReturn Wordpress Post
I have the following script that returns me the status and the amount of posts you have in this state, now I would like to display these posts, someone knows some solution? <?php $query=" SELECT…
-
1
votes1
answer230
viewsInsert new columns with ID creation into existing table
I have a table called products, this table already has the fields necessary for its use, but now I need to include 4 more (four) columns in it, columns that will be the description of some ID s I…
-
1
votes1
answer45
viewsError sqlalchemy 1044
I have a Python application that connects to a Mysql database through Sqlalchemy, but it wasn’t me who developed it. When migrating the database to another server (aws.rds go Daddy), I switched to…
-
1
votes3
answers45
views& Error inside mysql query
Colleagues. I have a table that inside the field Days tail: Monday & Tuesday But when giving query inside PHP, does not return anything, even if the query is correct: $sql =…
-
1
votes1
answer41
viewsIt is not writing in the database, and the columns have numbers as names
This is a part of the code that is not writing in the database. Can help me? case 'questao': include "conect.php"; $bd ="questoes"; $banco = mysqli_select_db($conexao,$bd) or (mysqli_error());…
-
1
votes3
answers16505
viewsHow to get month and year of a date?
How I get the month and year of a date varchar in the MySQL? Example: 31/01/2013 31/02/2013 01/03/2013 01/01/2014 I only want the dates 01/2013 in the case of 31/01/2013…
mysqlasked 8 years, 3 months ago Guilherme Freire 767 -
1
votes1
answer44
viewsHow to Return Results with Integers and Nulls?
I’m trying to build a Query but they’re not succeeding, in my database I have 28 information with code 32, and 62 information with code 23, but there is information with null code, and I wanted to…
-
1
votes1
answer455
viewsHow to make a Count in Mysql using case or if?
I need to know how I can do a search in mysql to know how many documents I have to analyze with a condition that if the previous process is not released it cannot count. SELECT COUNT(`num`), CASE…
-
1
votes1
answer33
viewsQuery of Records in DATE Fields by Month
Hello! I would like a help I’m performing queries on a table VIAJEM where I own 2 fields IDA And CHEGADA. Both of the kind DATE. I need to consult all the records of a particular MES. Ex. ida =…
-
1
votes1
answer109
viewsLimit the number of forms to be printed per page
I have the following code below that generates a form of information brought from the bank. If I print 2 forms of this per page is right on an A4 sheet, but the question is that I have tried to…
-
1
votes2
answers235
viewsLimit 1 line in queries with primary key queries
One of the best practices on optimization of Mysql queries, dictated in an internet source, says that it is important to limit as 1 the queries that already display only one line. For example, if…
-
1
votes0
answers35
viewsHow to resolve this Trigger in Mysql?
create trigger tr_kmanterior before insert on t_consumos for each row set new.kmanterior_c = (preview.kmatual_c); OR create trigger tr_kmanterior before insert on t_consumos for each row set…
-
1
votes0
answers619
viewsJSF Download File Saved in Database
Hello, I have a jsf page where I upload the data from a entidade, between the data there is an attached file (pdf, xls, jpg etc.). I would like you, when clicking on the file name, to download the…
-
1
votes1
answer29
viewsRelatedd and two tables
Guys, I have two tables and I need to connect them. I’m doing it this way: SELECT lancamentos .* FROM lancamentos INNER JOIN clientes ON lancamentos.cliente_id = clientes.id ORDER BY clientes.nome…
-
1
votes1
answer4404
viewsMysql: Pivot (p rows/ columns) columns with the result of a query dynamically
I have two sets of tables below: 1: 2: I created a query that brings the results of the two tables using Union: Select tbprojeto.projNome As Projeto, tbindp.indPNome As `Tipo(Ind/Idx)`,…
-
1
votes1
answer596
viewsView report from Mysql tables
I have a problem generating a report, in which the site administrator will see the fields ID and login of all registered users, so far, I have this code: <?php require_once('config.php'); $emite…
-
1
votes1
answer53
viewsDo not save information in mysql when I click on one of the radioboxes in the form
I have a form with several text fields, radiobox, selectbox, and I want to save the information in the table of the bank I use. However, I’m having a problem when I click on the first two radios…
-
1
votes2
answers623
viewsLast update Mysql table
good morning. I have a trial that runs daily deleting data from a table with daily data from my system’s customers and for data availability reasons, sometimes this trial runs sooner or later. I…
-
1
votes1
answer70
viewsProblem When printing an SQL query on the PHP page
I have an Sql query and my code is only printed the first line of the query, Does anyone have any idea what might be my problem ? ERROR: Warning: mysql_fetch_assoc() expects Parameter 1 to be…
-
1
votes0
answers345
viewsMysql: Insert with conditional
I need to realize the following situation below, but when executing I have the error: /* SQL Error (1064): You have an error in your SQL syntax; check the manual that Corresponds to your Mysql…
mysqlasked 9 years, 1 month ago Danilo Miguel 332 -
1
votes2
answers528
viewsCreate Mysql user and database via PHP
1 - New Mysql user and database can be created via PHP script? 2 - If yes, it would involve some security risk such action? Objective: I have a running system (own CMS) where the user does…
-
1
votes1
answer42
viewsQuery mysql according to Array unserialize
In this select the bottom how can I make it only return the lines with the ids that are in this variable ( $range ) this variable is returning data from several ids database // estou utlizando a…
-
1
votes1
answer844
viewsWhy does my PHP script only return me Resource id #4?
I am only trying to get the name of a column of a database table, and it always returns me only Resource id #4, I will send a part of my code. <?php mysql_connect('localhost', 'root', '') or die…