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
answer95
viewsStrange character at the beginning of the site pages
I am developing a site in PHP and MYSQL and all pages are displaying the following characters at the beginning of the page:  Each page (index, about, contact...) when opened has in the upper left…
-
1
votes0
answers45
viewsJava application running as Windows service
I need to develop a Java application that should run in company branches as a Windows service. The scenario is as follows: I need to get some information from the database of a third-party software…
-
1
votes1
answer30
viewsDoubt in SQL Query
Guys I have the following table: --- mensagens id usuario_envia usuario_recebe texto data_envio But I want to list only the "Conversations", for example, I want you to list the messages grouping…
-
1
votes0
answers215
viewsSELECT in MYSQL grouped by month, but showing all
I have the following table in MYSQL: cavalo - 2016-01-15 cachorro - 2016-01-16 gato - 2016-02-23 coelho - 2016-02-24 ovelha - 2016-03-21 tatu - 2016-03-22 I wanted to give a SELECT and show that…
-
1
votes0
answers69
viewsDifferent Date Format
Sirs, I have the following code: $funcionario_blocodcon_novo = array(); for($i=0;$i<count($funcionario_blocodcon['localtrabalho']);$i++){ foreach($funcionario_blocodcon as $key=>$val){…
-
1
votes1
answer34
viewsSearch Interlaced ID (mutual), sql mysql
I have a table with this format RELATIONS ----------------- ID | ID_1 | ID_2 all in INT and the ID is self incrementable. She’s filled this way: ID | ID_1 | ID_2 ----------------- 1 | 1 | 5…
-
1
votes0
answers310
viewsMysql - Performance with 0% efficiency
My Mysql is very slow in queries, but these same queries made on the production server are fast. So moving here I found this screen as circled in red says that the efficiency is at 0% and production…
-
1
votes1
answer40
viewsProblem to sum values in JDBC
The console presents me the following error: FUNCTION worksoviagemd.SUM does not exist. Check the 'Function Name Parsing and Resolution' Section in the Reference Manual Can only be sql in my…
-
1
votes1
answer288
viewsRun an UPDATE on Mysql only when the number of Rows is 1
How to make a UPDATE only run when the number of Rows returned is 1 in a single query with SQL syntax only using the example below? Example: SELECT count(*) AS rows FROM exemplo WHERE id_usuario =…
-
1
votes0
answers118
viewsSelect days within date for work shift assembly
I am in need of a function that will enter selected dates on Datapicker var date = new Date(); $('#pre-select-dates').multiDatesPicker({ addDates: [date.setDate(14), date.setDate(19)] });…
-
1
votes3
answers300
viewsRelationship of tables
Good Night, I have a database with several tables and need to make a query relationship 4 tables CREATE TABLE IF NOT EXISTS `cad_cliente` ( `id_cliente` smallint(5) unsigned NOT NULL, `nome_cliente`…
-
1
votes0
answers31
viewsProblems with data type
My website is popping up like this http://www.adota-me.tk/anuncio.php?id_anuncio=1454792030 With some strange characters. I’ll tell you everything I put. In php this:…
-
1
votes1
answer493
viewsSubtract row from one table by another table
I have a question. I need to subtract a row (quantity) from the table (sales) that was entered by the user on form, in the table(products) in the row(stock), and only the last record registered in…
-
1
votes1
answer290
viewsencrypt and determine valid time for php url
I need to encrypt some url parameters, such as email and client code, and determine the valid time for the forwarded link. I looked at Facebook, Google and Twitter that use this methodology to…
-
1
votes1
answer122
viewsChange type of all table fields
You can change all fields in my table to VARCHAR? I have a table with plenty of fields and I wanted all fields to be automatically changed to type VARCHAR
mysqlasked 8 years, 9 months ago David Concha 539 -
1
votes2
answers67
viewsSearch only a random part within a select mysql code
The problem is this, I have the code concatenated, I need to see this code concatenated if part of it is in the table, ie when joining field 1 and field 2 with PHP, before searching in the table, a…
-
1
votes1
answer517
viewsmethod to login using Datasnap
I’m making an Android application using Delphi, I have a server with the methods to get the data from the Mysql database, I would like to know how I can make a method to get users who are already…
-
1
votes1
answer173
viewsError picking up Time type data from database
I am making a query but it is giving error when I try to get values of type Time. This is the error: java.sql.Sqlexception: java.sql.Sqlexception: Bad format for Time '13:00:00.000' in column 5 The…
-
1
votes3
answers751
viewsProblems with uploading images in PHP
I never touched uploading files and today I really need to do it. I have a code to test, to then use it on the site. Here’s the HTML: <html> <body> <form action="inserir.php"…
-
1
votes0
answers208
viewsQuery mysql still running after Lost Connection?
I am using Mysql Workbench to run a duplicate data removal query. When I run the query for a very large table, due to the 600sec limit of Workbench connection, it results in Lost Connection. Even…
-
1
votes1
answer80
viewsSelect from three tables in a list - MYSQL
I have three tables: ESCRITORIOS id nome ESCRITORIOS_SEGMENTO id_escritorio id_segmento SEGMENTOS id nome_segmento What I need is to give a SELECT to list this information like this BLAH SEGMENT:…
-
1
votes1
answer617
viewsHow to disable query caching in MYSQL?
When we use the command SHOW VARIABLES LIKE 'have_query_cache' we can see if the cache is enabled or not. Upshot: Variable_name | Value ---------------------------- have_query_cache | YES How do I…
mysqlasked 8 years, 9 months ago Wallace Maxters 102,340 -
1
votes0
answers389
viewsCreating Points in Google Maps api with data using PHP / Mysql
I’m trying to learn how to move and make maps using the google maps API but I want to know if there is and how to score a map automatically using points (coordinates) that were registered in the…
-
1
votes3
answers485
viewsMake an ORDER in Mysql from another TABLE
I was wondering if it’s possible on a mysql_query search and ORDER HER according to more recent updates from another table for example.. I have this query, when the user logs into the chat it gives…
-
1
votes3
answers4076
viewsSELECT with PDO and variable
How is it possible to make a SELECT in MYSQL with PDO next to this below: $buscarNoticiaTitulo = "noticias.titulo LIKE '%teste%'"; $sqlNoticias = $pdo->prepare('SELECT * FROM noticias WHERE…
-
1
votes1
answer42
viewsQuery in a given string
Good staff my question is the following: I would like to know how to make a query in the database of certain string, for example I would like to in the field "name", I would like to make a query by…
-
1
votes0
answers281
viewsReturn table data parameters, even if $query result is 0
Good evening: I am developing a project that consists of all parameters in a table of parameters... However, in my SQL it only works with records above 0: Follow the code public function…
-
1
votes1
answer871
viewsTake time to access a page and write to the BD
I need to take the time that the user was on a given page, and the user leave the page, this time is recorded in the database. Would anyone have any idea how to do? [Edited] The time I managed to…
-
1
votes1
answer603
viewsHow to stop a stored procedures in Mysql?
there is the possibility of stop one stored proceduresin the MySQL? I put a procedures to power a database table for load testing with 10 million records, but the insertion is too slow and wanted to…
-
1
votes1
answer55
viewsWhere increasing condition
I have a table called users and want to catch some users as per id so I’m doing so: select * from usuarios where id=2; Only that I would like to get multiple users with different ids, for example…
-
1
votes2
answers1213
viewsDate fields entered with value 0000-00-00
I’m not able to record the dates of a form in my BD, the variables are correct because I can view them before sending to the bank, but when sending to the BD goes with the format 0000-00-00, this is…
-
1
votes1
answer1219
viewsIncrease PHP/Mysql script performance
Good Afternoon Currently, I have a PHP script that reads a CSV file of 6801 lines, and performs an INSERT as long as there are records. I am currently able to enter 19 records per second. In…
-
1
votes2
answers122
viewsGet higher and lower id with status = 1
I have a table in the database with several lines, I wanted to get the highest id, which has status = 1, how can I do this with php? The id is a table column and the status is another. Then I also…
-
1
votes1
answer89
viewsMysql - Returning some records only if grouped
I have a simple form system that records in the bank the amount of daily benefits of a person in the company. The database does not return this data in most cases. The problem started to happen…
mysqlasked 9 years, 4 months ago morphinduction 473 -
1
votes4
answers1429
viewsHow to search for results in Mysql where a given field only has special characters?
I need to search in Mysql, lines where a given field, for example 'Name', is filled only with special characters or white spaces. I tried several REGEX for such but unsuccessful. Could someone help…
-
1
votes1
answer23
viewsShow occurrences as fields
I am doing a query in the database, I wonder if it is possible to group elements and display them as if they were fields and within these fields the amount of occurrences. ex: The table looks like…
-
1
votes1
answer37
viewsInsertion of IMG in Mysql
The code I’m using is giving some error in which I can’t identify; If I select image X the upload happens normally, however if I select image Y the system simply does not insert and does not give…
-
1
votes3
answers2299
viewslimit no codeigniter
I have a code that takes data from the database and shows them in a table. I need it to appear only the first two records. For this I put a limit on my code. Only it is not limiting, but taking the…
-
1
votes2
answers606
viewsSort result using CASE and BETWEEN
In the first code just below, I can list the freight price of the table transport via the band cep and peso, however I am having a problem, I need to sort the result according to how cep sent,…
-
1
votes2
answers553
viewsFunction with CAST and SUBSTRING
This function would return the last two "95512" or to return the number without the last two digits "95512". The value passed to function can vary, at least 3 character and at most 11 DELIMITER $$…
-
1
votes1
answer55
viewsWhen you don’t have news
Hi, I have a news system and wanted a message to appear when there was no news in my database. Code: <?php $news8 = mysql_query("SELECT * FROM 10cms_noticias WHERE status = 'Ativo' ORDER BY ID…
-
1
votes0
answers426
viewsBest way to work with hierarchical data in Mysql for a system with constant register in the hierarchy
I have a table where I store user registration where each user was indicated by another user, so I keep a column ID and a column PARENT_ID. There are 2 ways to work with hierarchy in Mysql, are…
-
1
votes0
answers162
viewsINNER JOIN returning error
I’m trying an INNER JOIN between 3 more tables returns error, I don’t know what’s wrong. Query: SELECT aa.arq_arqid, aa.arq_nome, aa.arq_nomecrip, aa.arq_datetime, u_usuarios_u_userid…
-
1
votes1
answer64
viewsPulling information from a table to a news page
I have a news page that pulls id (is one of those noticias.php?id=1), but I wanted her to tell only the news comments I’m reading, not all. That’s possible? I already got PHP to count, but I wanted…
-
1
votes1
answer342
viewsI can’t bring all the records from the table
Hello, I’m not able to show all the records of a row of the BD table, I can only bring the first record. Here is my table: CREATE TABLE IF NOT EXISTS `tbnoticiasrel` ( `id` bigint(20) NOT NULL…
-
1
votes2
answers57
viewsThere is a difference between connecting to the database using a class and the visual studio: Tools>Conect_to_database?
I am learning C# and would like to know if there is a difference between the two types of connection cited in the title. If so, which?
-
1
votes1
answer1629
viewsAutomatic database synchronization in Mysql
Good morning, I have a local Mysql database where the availability is 24h, however I have another database in another location that is available for a few hours, anyway... I want to synchronize two…
-
1
votes1
answer313
viewsPHP Insert error
I am having a problem when entering data in the database, I have already checked if there is any field where it is not accepting null value, however everything is ok, when appearing the error is…
-
1
votes1
answer523
viewsHow to perform a C# CRUD with Mysql and ADO
I need to do the relationship between tables 1:N and N:N. Table produto: public int id {get; set;} public string produto {get; set;} public list<tamanhos> tamanhos {get; set;} Table tamanhos:…
-
1
votes1
answer3169
viewsHow do I connect to the database via [Wordpress] to query?
Well, I have a call jQuery Ajax in the header.php of my theme that is entering a file PHP at the root of my Wordpress and return me the echo test. I need this file to query the banco de dados and…