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
answer103
viewsInsert an ID into SQL+PHP
I’m making a form where the user inserts the data and the same receives the confirmation along with a ID record in php with sql, I’m just not getting this final confirmation along with the id,…
-
1
votes1
answer170
viewsHow to add query in a Datagridview?
I managed to make Inserts and Updates. I downloaded this file: using System; using System.Collections.Generic; using System.Linq; using System.Text; using MySql.Data.MySqlClient; using System.Data;…
-
1
votes3
answers913
viewsCheckbox Fields From Database
I have 3 tables, respectively: Vehicles veculo_id, veculo_name. Accessories acessorio_id, accessorio_name Vehicles veculo_id accessorio_id On the vehicle registration page the fields accessories…
-
1
votes1
answer694
viewsHow to check if a Resultset is empty?
I’m making a query in Mysql and when the query exists it returns the good values. But here’s the question, what’s the value ResultSet receives when the search does not exist? Type look for a name in…
-
1
votes2
answers586
viewsApplication does not save data and only saves code
I’m developing software for a video rental company with Pattern MVC design (Model-view-controller) and the problem of not saving people is occurring. It only saves people’s code and I don’t even…
-
1
votes3
answers704
viewsYou can use two columns of the same table in a WHERE
In a select I can use in Where to filter the results, two columns of the same table? Ex: Select id, idpai, nome FROM tabela Where id=idpai
-
1
votes1
answer191
viewsSelect with Search conditions
I need to make a query where only display results in one condition: # Search the Database $select_sql = "SELECT * FROM users WHERE user LIKE :search OR date_access LIKE :search OR ip LIKE :search…
-
1
votes1
answer85
viewsError number 1064 Codeigniter
An error is appearing when I log in to my system: Error Number: 1064 You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use…
-
1
votes1
answer530
viewsHow to recover data from an HTML form opened in a Webview?
Hello! I have a responsive web application that I intend to open via android app through a Webview. Well, the only problem is that I would need to take some Submit data from just one application…
-
1
votes1
answer161
viewsUpload mysql image
I am in need of a help to develop a code to store images in the database, so far I have not achieved anything... I don’t know if it is better to store the file in a directory and only the name in…
-
1
votes1
answer41
viewsInvalid Mysql characters error?
I am using this query to do a database search: SELECT * FROM cidades WHERE cidade LIKE ? LIMIT 1 in the placeholder I used "Narnia" And I got this mistake: General error: 1267 Illegal mix of…
-
1
votes1
answer51
viewsHow to update a field using it at the same time?
I wonder if there’s a way to add the value of a line to itself without having to do a query then an update. I have a column called total that stores integers, at a given time I want the value that…
-
1
votes1
answer86
viewsProcedure - Error code Mysql : #1064
CREATE DEFINER=`root`@`localhost` PROCEDURE `teste`(IN `pId` VARCHAR(20))NO SQL INSERT INTO gpetnaold.pessoal SELECT * FROM gpetna.pessoal WHERE gpetna.pessoal.id=pId; INSERT INTO gpetnaold.contato…
mysqlasked 8 years, 2 months ago Helder Pereira 121 -
1
votes1
answer157
viewsQuery Mysql confusing results
I have to make a mysql query through a Java method. This is the sql I did to test if it works: select * from servicos S, clientes C, motores M where C.nome = "Claudio Fernando Pires" group by…
-
1
votes1
answer2115
viewsList duplicate names in Mysql for change
I need to list all the duplicate names in a certain table and I’m not getting it, what I have so far is this: SELECT nome, foto, ativo, count(nome) FROM comColaborador GROUP BY nome HAVING count(…
mysqlasked 8 years, 2 months ago adventistapr 5,498 -
1
votes1
answer57
viewsDoubt about PDO connection
And everybody, I have a question about the PDO connection. This is the connection I have in the script that I’m configuring: <?php function getDB() { $dbHost = 'host'; $db = 'bd'; $dbUser =…
-
1
votes2
answers620
viewsWhere em Join - Sequelize
Hello, I want to do a search within several tables, for example: SELECT * from tab1 INNER JOIN tab2 ON tab1.tab2_id = tab2.id WHERE tab1.name LIKE '%blabla%' or tab2.title LIKE '%blablabla%' How…
-
1
votes2
answers1980
viewsHow to group results from a row query to columns
Good afternoon, have this query SELECT tblcliente.idCliente, tblclienterespostapre.resposta FROM tblcliente INNER JOIN tblclienterespostapre ON tblclienterespostapre.idCliente = tblcliente.idCliente…
-
1
votes1
answer133
viewsSave data to DB and recover ID automatically
This is the code to save to the bank using the default DAO, where I want to recover the id record to save the table Usuario who owns the FOREIGN KEY table Habilitacao: public int…
-
1
votes2
answers501
viewssql return zero
mysql returns me the following codMunicipio count(codMunicipio) 271 7 273 248 274 18332 275 25 276 4 as the 272 did not return any, it is not displayed. But I need to return the 272 with Count 0.…
-
1
votes1
answer1611
viewsMysql UPDATE with JOIN and WHERE
My tables EMPREGADO Cod_Emp, Nome_Emp COMPANHIA Cod_Comp, Nome_Comp TRABALHA Cod_Emp, Cod_Comp, Salário, Cod_Emp_Supervisor I want to give a 10% increase to all company supervisors' test'. UPDATE…
-
1
votes1
answer136
viewsAndroid app closes when connecting to Mysql
I’m developing an application for Android that needs to connect to my database on Locaweb servers. However, as it is in the code, the class closes if it cannot connect to the server. Am I making the…
-
1
votes0
answers20
viewsmysql code in viewreport
Good evening, I’m trying to create a report, but for example... I have a property table and it has the id, the name and the like... and I have the animal table that is saved in it only the id of the…
-
1
votes1
answer312
viewsInsert range of numbers into an automatically SQL table
The point is that I want to insert in a table field a range of numbers that goes from 100 to 1,000,000 and I didn’t want to be doing 1 to 1. How can I do this automatically? In SQL Server…
-
1
votes0
answers1377
viewsPopular a select PHP with Mysql data of city and state
I found some articles by Stack already, however, I tried anyway to make it work and could not. I own a bank with all states and cities of Brazil, which are ok. Select page <!-- Select Estado…
-
1
votes4
answers1661
viewsRedeem name and show in option through id
I have a id table, example: user with id = 1, how can I get this user’s name using the id of it and show in a input? I did so: while ($dados = mysql_fetch_array ($sql)) {?> <option…
-
1
votes0
answers225
viewsOperations with calculated fields from a mysql view
Good afternoon, I have a view where there are several fields where I have several calculations, and the result of these calculations I would like to use in other fields of this same view. An…
-
1
votes3
answers1779
viewsMany tables with little data or few tables with lots of data?
I have a bank that will receive a lot of data. I am in doubt whether it is better to organize the data into a few tables with a lot of data or further divide the data into several tables. In which…
-
1
votes0
answers675
viewsMysql Error 2002: Can’t connect to local Mysql server through socket
I’m just putting a website for hosting and already set up the connections mysqli, but it’s giving this error here when trying to run the site: Warning: mysqli::mysqli(): (HY000/2002): Can’t connect…
-
1
votes4
answers11113
viewsWhat kind is appropriate for field that saves hours in mysql?
I need to save a field that saves hours in the database mysql. It’s a service record where I need to store the amount of hours of that particular service. When the service scheduling occurs at 11:00…
-
1
votes1
answer38
viewsHelp for this query
Good afternoon Guys, I have these two tables that relate to know how many times a user accessed the system: And I have this query: select nome_usuario, count(id_log) as qtde from logs as l left join…
mysqlasked 8 years, 1 month ago Eduardo Santos 754 -
1
votes1
answer483
viewsLogin with JAAS + Tomcat
I did the JAAS configuration procedures in my JSF project, when I try to access it shows the information that user and password does not check, but I have already created the user table. xml…
-
1
votes1
answer601
viewsData insertion problem in mysql table
I’m having a problem to insert data into a table someone can show me the error. <html> <head></head> <body> <div> <form method="POST" action="varcadastro.php">…
-
1
votes1
answer26
viewsHow to count equal records in a column and get the same number?
Table example: | Ti | Orien | | ---| JML | | ---| JML | | ---| RGM | | ---| AAA | | ---| AAA | Result example: JML - 2 RGM - 1 AAA - 2…
-
1
votes2
answers137
viewsWordpress - How to include new fields in the user table?
I want to include the following fields in the registration of registered users in my blog: IBGE, Municipality and UF. How do I include these fields and later access them on a specific page?…
-
1
votes2
answers145
viewsavoid error logging with mysql connection
Guys I make a connection to mysql using php. I do so: mysqli_connect($ip_bd_mysql, $login_bd_mysql, $senha_bd_mysql, $banco); The problem is that it is time that the name of the BANK is wrong, and…
-
1
votes0
answers213
viewsConfigure Mysql Memory Usage
I have a Windows Server 2012 server with 24GB RAM, AMD FX 6100 processor with 6 cores. I would like to configure Mysql for better performance reading and importing bases, someone can help me set up…
-
1
votes0
answers116
viewsMysql Query in Node ignoring difference condition
I have had a peculiar problem while changing my Node.JS server to certain Mysql queries. I have the following code that works normally in Mysql Workbench: SELECT id, nome FROM `tabela` WHERE…
-
1
votes3
answers223
viewsPDO Pagination - Fatal error: Out of memory
I am making a pagination, but it is generating a memory error. Is there any way to optimize or fix the fault? Or is it on the same server? Note: the php.ini this set the memory in 512. if…
-
1
votes3
answers253
viewsIs it possible to modify a field before performing a search? (PHP MYSQL)
"SELECT * FROM table WHERE content LIKE '%$search%'" It is possible to modify the values of the 'content' column before the search is performed? Example: "SELECT * FROM table WHERE…
-
1
votes1
answer1258
viewsQuote problems importing data from Excel to Database (Mysql)
I have an excel file with several data, the problem is that apparently there is some data with double quotes and when you upload this data, all the columns become maladjusted and consequently the…
-
1
votes0
answers862
viewsCreating multidimensional array from query to BD Mysql
I have the following problem: I have a table in a Mysql database and in a code snippet I need to make the content recovered by a query made to this database be stored in a multidimensional…
-
1
votes4
answers594
viewsReturn value in SQL Server query
I need this appointment to return 2 instead of A. TIPOUSUARIO is the varchar type. someone can tell me where the mistake is? USE DATABASE SELECT TIPOUSUARIO FROM TABLE UP (NOLOCK) WHERE TIPOUSUARIO…
-
1
votes0
answers36
viewsMysql doubt in fk null (Blank candidate election)
I’m doing a voting system and I need you to take blank votes what is the best option to do this? agree to pass a null value in the cd_candidate column? I can’t create a blank candidate in the…
-
1
votes0
answers344
viewsError Code: 1452. Cannot add or update a Child Row: a Foreign key Constraint fails
I’d like to ask a question, or just show me the way. There is a table called Questionrio from it I take the records in a precedent and organize the data in it. Here is my code: CREATE…
-
1
votes1
answer692
viewsMulti Language Site / Multi Language (Automatic Country Detection without Permission)
I have a small project and would like to create a multi language system for the site. I found several forms here on the site, but I did not see any with this example, which including stackoverflow…
-
1
votes1
answer9292
viewsHow to set up and check Mysql to improve performance
How to set up the Mysql server for better performance in relation to memory usage, processing and cache usage where the machine has limited resources? Is there any tool that can help me set the best…
-
1
votes1
answer344
viewsReset mysql Table automatically
I have a database that stores some leads, it is possible to reset the tables of this database every day at a certain time or until it reaches so many lines? Use phpmyadmin in Cpanel.
-
1
votes2
answers15532
viewsHow to do an UPDATE using data from two different tables?
Once upon a time the table: Id dado1 dado2 01 1000 10 02 1234 12 03 9999 1 I had a task cron which performed the following update daily: UPDATE tabela1 SET dado1 = dado1 + dado2; Only to organize…
-
1
votes1
answer110
viewsDynamic insertion according to date and days of the week
I’m creating an application using webservice in PHP. Within the application the user will set specific days to generate an alert, for example: second fourth sixth In this way, I would like my bank…