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
votes2
answers577
viewsMysql, doubt about variables
Mysql allows using various type of syntax in variable declaration ex: declare i int unsigned default 0; set @str = "select "; Has some advantage in using one type or another, or some disadvantage or…
-
3
votes1
answer312
viewsMount Filter and Subfilter Menu
I am trying to assemble a menu where I should show the Filter and Subfilter, I am able to assemble the Filter description but the Subfilter not yet. What is happening is that it starts to assemble…
-
3
votes2
answers8263
viewsAssign Mysql query result to a PHP variable
As if, after counting how many records I have in a database, how do I put the value inside a PHP variable: $sql = mysql_query("SELECT COUNT(*) FROM `users`"); $row = mysql_fetch_array($sql); $total…
-
3
votes1
answer133
viewsAJAX sends information to PHP but fails to insert only one data
Look at my code: HTML: <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/criaEvento.js"></script> <form…
-
3
votes2
answers1767
viewsSELECT with keyword search
How to make a SELECT with specific fields and using LIKE %% in the same instruction? something similar to: SELECT TABLE_A.COLUMN1, TABLE_A.COLUMN2 FROM TABLE_A WHERE COLUMN2 LIKE 'A%' I’ve tried it…
mysqlasked 9 years, 5 months ago Hebert Lima 987 -
3
votes2
answers4434
viewsAdding numbers from a Mysql column using PHP
I have several results in the Mysql database, I want to take the results and sum all the numbers in a column, in PHP. How do I?
-
3
votes3
answers5605
viewsColumn 'column name' in Where clause is ambiguous
I’m trying to ride a left join where I want the results of a particular code. My SQL is: $resultado = mysql_query("SELECT CA.DAT_EHORA_EVENT, CA.TXT_NOMEX_EVENT, CA.MEM_DESCR_EVENT FROM tbl_CLIENTES…
-
3
votes1
answer105
viewsGroup on an equal footing
I need to group the result when there are equal records, regardless of the order, whenever the same colors are chosen - group the colors and the users. I need to produce an output like the one…
-
3
votes1
answer923
viewsHow to sort and filter queries between two tables?
I have two tables, one of posts (posts) and another of friends(Friends). In my script there is an area of feed where I would like to present the latest posts from the logged user’s friends. But…
-
3
votes1
answer428
viewsError trying to create a database connection (Mysql)
I tried to make a connection to the Mysql database using AsyncTask, but is giving error in the class responsible for the connection, the MysqlConnect: The constructor Log() is not Visible I’m…
-
3
votes2
answers2142
viewsProblem when comparing hours
When comparing timetables I have in the registered database the opening and closing hours of an establishment. I’m having a problem comparing the hours to see if the establishment is open or closed,…
-
3
votes2
answers28630
viewsConvert Mysql data dd/mm/yyyy to yyyy-mm-dd
I have a database where I entered the dates in the format dd/mm/yyyy (example: 05/11/1987), but now I’m organizing some reports and need to update all dates in the database to the format yyyy-mm-dd…
-
3
votes1
answer357
viewsRead PHP data in Javascript
I am a beginner programmer in both PHP and Javascript and I have a doubt in a project I am developing. I have a server connected to a PHP file and am requesting the following fields $FLD="idfca,…
-
3
votes2
answers1498
viewsEntityframework, Migrations and Mysql. Schema name being misinterpreted. How to resolve?
I have a problem using Migrations with Mysql. When I try to create the first version with Migrations he’s making the schema/name of the bank part of the table name: public partial class Initial :…
-
3
votes2
answers767
viewsHow to ignore a duplicate field and proceed with insertion?
I have a file txt that I am extracting information and in it the information is repeated 6 times, which inserts me in the database the same record also 6 times. Setei UNIQUE for a unique number to…
-
3
votes1
answer471
viewsMysql now() does not display the correct time
I need to somehow insert into the server the time EXACT who sends a message to the database. I’m using the function NOW() to record the moment: "INSERT INTO `chat` (id_de, id_para, data, mensagem,…
-
3
votes2
answers99
viewsSet roles for users stored in Database
How to structure in the database a structure of user roles (ordinary users, entrepreneur, site_amdin), each user will have different functionalities, different powers in the application that will…
-
3
votes2
answers706
viewsHow to send array files via ajax?
Well personal I have one script that inserts the posts into the database now I’m trying to upload images along with the post I’m trying to trouble sending the array of input file to the file where I…
-
3
votes1
answer492
viewsSelect com Update
Would anyone know if there is an SQL calling to run a SELECT using LOCK IN SHARE MODE registry and running an UPDATE at the same time? example: SELECT * FROM Nome_Tabela WHERE id = 5 LOCK IN SHARE…
-
3
votes1
answer552
viewsInsert data into mysql, commit() does not work
I wanted to enter in the database definitely. But with this code I am not able, the record is saved but does not commit(): import MySQLdb def conn(): try: db =…
-
3
votes1
answer77
viewsCount Values with PHP and SQL
Everybody, Good afternoon. I have the following question. I have a questionnaire with 10 questions, the answers to these questions can be 0 to 5, I would like to make a while out counting the…
-
3
votes1
answer168
viewsMysql.Entity version compatible with Mysql 5.6
What versions of: Mysql.Data Mysql.Data.Entity EPH Compatible with Mysql version 5.6?
-
3
votes1
answer710
viewsChange array keys returned by mysqli_result
I need to change the keys of a result obtained by mysqli_result->fetch_assoc() If I do this research : "SELECT exemplo.nome, exemplo.apelido, exemplo.idade FROM exemplo WHERE exemplo.id=1" get…
-
3
votes1
answer2916
viewsApostrophe causing error when entering data into Mysql
I’m a beginner in PHP and I’m creating a personal project to consolidate my knowledge until I came across a problem, by entering a name that has an apostrophe this apostrophe makes the INSERT INTO…
-
3
votes1
answer776
viewsStore form data temporarily before writing to the database
How do I store data from a form temporarily before entering it into the database? I have a form with a set of fields. After the user fills the set of fields, he will have the option to add another…
-
3
votes1
answer145
viewsInsert into database recording in half
I take the name of the news and insert in another table, but one of the fields is going by half, follows image of print: Database Source code of where send: <input name="nomenoticia"…
-
3
votes1
answer1005
viewsHow to describe the database of a chat with multiple people
That it’s easy to make a conversation between two people, I know, but then someone can quote an example of how to make a group conversation? With an unlimited number of people. Conversation between…
-
3
votes2
answers452
viewsHow to get the sum of three tables in sql
I have 3 tables, being them: Schoolhouse: id, id_escola and nome_escola; Professor: id, id_escola and nome_professor; Students: id, id_escola, sala_aula and numero_alunos; I am aware of the joins,…
-
3
votes2
answers92
viewsProblem with INNER JOIN
Good night, I’m making a inner join 3 tables but I’m not getting it to work must have some mistake that I’m not able to detect or do the right way I’m new to this inner join PHP SELECT *, (SELECT *…
-
3
votes1
answer386
viewsUsing Elasticsearch to do complex searches and then get the Ids for Mysql query
I’m thinking of the following idea: Use Elasticsearch features to make complex searches instead of making direct queries to Mysql using many where. If I were to use MYSQL I would have to create many…
-
3
votes1
answer94
viewsCharset Mysql and PHP
My mysql table is UTF-8 formatted and all accents appear correctly, but when I request with PHP and display the data they do not appear in UTF-8 format. p.s: my page already has the goal for utf-8.…
-
3
votes1
answer4660
viewsForeign keys in java
I’m having a little trouble implementing the foreign keys in my example. Can someone help me assemble the DAO class? Cidadedao.java public class CidadeDAO { private final Connection connection;…
-
3
votes1
answer183
viewsProblem concatenating query in PDO
Good night, I have a research that contains multiple choices for checkbox and Selects and I’m trying to concatenate query to search according to the user’s choice but I do not know what I may be…
-
3
votes1
answer1008
viewsInstall database together with C#
I am finalizing an agenda of the meeting room that will be in the company reception, so I opted for the base to be locally and not networked. I intend to use Mysql or Sqlite. Is there any way I can…
-
3
votes1
answer115
viewsError in PDO database
I am creating a page that saves values in the Mysql database using PDO and is not writing the data. I am using the following code: <?php $conexao = new PDO('mysql:host=localhost;dbname=dbTeste',…
-
3
votes1
answer265
views -
3
votes1
answer2214
viewsOperation of group_concat
I have some questions related to the use of group_concat, more specifically for performance. When using group_concat can’t use limit. // a query retorna todos os ID's select group_concat( id ) from…
-
3
votes3
answers3234
viewsBrowse data from 1 day to 3 days ago mysql
I’m trying to demonstrate records from the last 3 days, but it should be subtracted two days and only demonstrate the value of a single day before the 2 days, currently I have the following code…
-
3
votes1
answer167
views -
3
votes1
answer1429
views -
3
votes2
answers7769
viewsLog table using Mysql
How to create a table of log Mysql audit that stores when and what was changed in each record? Mysql provides something that can facilitate this kind of thing?
-
3
votes6
answers12215
viewsHow to view php/mysql and Angularjs data?
I’m trying to do some tests with PHP + Mysql + Angularjs and I was stuck in a doubt of how to treat the database data with angular and send to screen, I have the following codes: con-bd.php <?php…
-
3
votes2
answers895
viewsKnow if the date is between two columns of Mysql - Database?
I made the code below and it works, the check indicates whether the date is contained between the two columns and returns the result.: SELECT * FROM `ips_bloqueados` WHERE ip = '::1' AND…
mysqlasked 9 years, 7 months ago Danilo Ramon 126 -
3
votes1
answer122
viewsAdding values in existing tables with Rmysql
I had asked earlier a question about Mysql database on using the RODBC library and due to an error in the types,I saw in one of the answers told me about the Rmysql library and decided to try it.…
-
3
votes1
answer28159
viewsselect only by month of a particular column - mysql
Well I want to select with the condition that such column has determined month, and only brings results this month. I was doing this, but it didn’t work out. SELECT * from funcionarios where…
-
3
votes1
answer562
viewsC# Mysql transaction in distinct classes and methods
How do I interact a transaction between 2 methods that are in different classes? In my method where I open the transaction is as follows: public string InserirFuncionarioM(FuncionariosDTO…
-
3
votes1
answer1467
viewsMysql Error 1114 (HY000): The table is full
I exported a database with a 14GB Mysql size from a Windows OS computer and I intend to import it into Mysql from a Ubuntu 14.04 OS computer I used the following command to export the database…
mysqlasked 9 years, 2 months ago Pedro Cunha 195 -
3
votes2
answers2315
viewsExport table to file using PHP
I wonder if it is possible to export a mysql database table in PHP so that I can save in a variable the script to create this table. Same as Phpmyadmin, export table to sql file.
-
3
votes2
answers168
viewsPHP/Mysql Add Category to Materia
Good staff never had much interest in the back-end area, but for greater reasons I’m having to learn. So far I can do the basics, which are insert, delete, update, view the data using php/mysql. Now…
-
3
votes0
answers582
viewsHow to make a form with the number of variable fields and insert this data into the database?
Hello. I want to create a CRUD that does word management and its synonyms. A word has several synonyms (1:N). I would like a solution to dynamically include the inputs, according to the demand of…