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
-
2
votes1
answer714
viewsMysql - Update to null Unique column
Good afternoon, you guys. I would like to know if there is a possibility of UPDATE for NULL where the field allows only values UNIQUE. I tried that way: update FUNCIONARIO set codigocartao = NULL…
mysqlasked 9 years, 5 months ago Iago Correia Guimarães 799 -
2
votes1
answer1515
viewsHow to update via ajax + php
I want to update data through a modal, however it is not updating. Does anyone have any idea why it is not updating? Modal: <script type="text/javascript"> $(document).ready(function() {…
-
2
votes0
answers493
viewsHow to use tags in Mysql and PHP
I am creating a website and would like to know how I can use tags with Mysql and PHP. I have two tables: produtos and informacao. On the table informacao I have a field called related products where…
-
2
votes1
answer37
viewsUse of Firebird database from one PC to another
I backed up a Firebird database from a PC and what happens is that I put this database on another PC but then the application says that the database is unique to another user or the program should…
-
2
votes1
answer85
viewsRead phpMyAdmin column
I was able to separate some values from a column in a table in Phpmyadmin through some tips and I did this: mysql_select_db($database_conexao, $conexao); if ($dep != "" and $sub != "") {…
-
2
votes1
answer334
viewsCheck all just selects the first foreach value
Good people, I have the following code, and he was supposed to select all the values inside the foreach, but instead of doing it just selects the first value.. I tried to make a test of Submit that…
-
2
votes2
answers159
views -
2
votes1
answer2396
viewsConnect Mysql Workbench to Hostinger Server
Several times I tried to connect the Mysql Workbench to the database of my website hosted on Hostinger.com.br but always makes a mistake. From what I understand the access data I am passing are…
-
2
votes1
answer701
viewsAccentuating problems on the most up-to-date server
I have 2 servers with the following settings: Server 1: PHP 5.3.10 Apache 2.2.22 Mysql 5.5.43 Ubuntu 12.04.5 LTS Server 2: PHP 5.6.9 Apache 2.4.7 Mysql 5.5.43 Ubuntu 14.04.2 LTS I’m using the Yii…
-
2
votes1
answer731
viewsUpload photo and save original photo and one cut?
Here he is saving only the modified, I wanted to save the original and modified. <?php $page=" Upload de Imagens"; if (isset($_POST["cadastrar"])) { include_once 'classes/resize-class.php'; //…
-
2
votes1
answer337
viewsURL Friendly by title
Good night people, I am here implementing the URL friendly system on a website and I have already working for some pages, I am now locked in the ver_establishment file that and what shows the…
-
2
votes2
answers95
viewsWhat is the best way to structure a Mysql tree table?
What is the best way to structure a product table where there are infinite categories and children, such as a tree? So you can do a simple autocomplete search? Thank you
mysqlasked 9 years, 5 months ago Tatiana Martini 23 -
2
votes0
answers593
viewsDelphi 6 connection error - Mysql 4.1 - libmysql.dll - Windows 8
Hello. Many should already have seen similar posts about this doubt, but I’ve done all the suggested actions, and it does not wheel. I need to connect Delphi6 in Mysql 4.1 (I cannot use other…
-
2
votes1
answer1039
viewsEncryption of mysql data
Can someone help me, I am using AES_ENCRYPT(string, string_key) (manual) to make cryptographic with key. Veja minha sintax. INSERT INTO trava (codigoliberacao) VALUES (AES_ENCRYPT('123456789',…
mysqlasked 9 years, 9 months ago Fabrício Mendes 843 -
2
votes2
answers53
viewsReturn data difference from two sql tables
I have a table ESCOLA with ID_ESCOLA and NOME_ESCOLA and another table PROFESSORES containing a FK_ID_ESCOLA and NOME_PROFESSOR. I wanted a table that would return me the names of all schools but…
-
2
votes1
answer139
viewsMultiple update in a configuration table
I would like to know the best method to update a table I have where there are 3 columns: ID, Key, Value Today I’m doing so: UPDATE dbuf.dmds SET situacao = '0' WHERE id_demanda = '1'; UPDATE…
mysqlasked 9 years, 9 months ago Alisson Santos 41 -
2
votes3
answers183
viewsReturn the difference between the last two records
What I need to do is in this image. How I do? This is the query I did and it’s coming empty and I don’t know why. SELECT event_type, value from teste t1 Where exists (select event_type, value from…
-
2
votes1
answer72
viewsError: mysql_fetch_assoc inside Function
function retornaStatusPesquisa($numeroStatus,$nomePessoa, $nomeTabela){ $query = mysql_query("SELECT COUNT(status) AS valorStatus FROM $nomeTabela WHERE status=$numeroStatus AND…
-
2
votes1
answer74
viewsEdit url user profile friendly
Good I have the paths of the friendly urls in the htacess file I am viewing the users by the url so by the profile file http://exmeplo.pt/users/carlos But I now wanted to edit the profile of this…
-
2
votes1
answer242
viewsHow to avoid a while for execution before finishing the task?
I’m having a problem doing a query in a Mysql database. This query returns me a lot of data, and this data is sent to make a comparison within a while. Usually it is exceeding the time of my server…
-
2
votes1
answer74
viewsForeach and Mysql
Dear colleagues. I am bringing two questions from the Mysql database, of which the user will register the respective questions. See: .... <input type="hidden" name="Pergunta[]" value="<?php…
-
2
votes1
answer258
viewsRetrieve an Insert ID from a table and use it to create a relationship with another table
Personal a great doubt, I am developing a classified site, I am recording the images and the ad at the same time, only the insertion queries are different, because the table of ads and images are…
-
2
votes1
answer334
viewsProcess multiple orders simultaneously and store in BD
I’m dealing with a new problem because of some new challenges... I developed a registration system and obviously in the future may have more than 100 registrations per day or even per hour or…
-
2
votes3
answers164
viewsReturn the id of a table in another table
I have a client table containing ID_CLIENTE, NOME_CLIENTE and another approval table containing CLIENTE_APROVADO. The approval table is filled with SOME clients in the client table but only the…
-
2
votes2
answers334
viewsError reading dynamically generated JSON with file_get_contents
I have this code that generates me a json file header("Content-Type: application/json; charset=utf-8;"); $codigo = $_GET['cod']; //variável para parametro que será passado ao servidor via URL $sql1…
-
2
votes1
answer301
viewsHow to assign a single nickname to 2 columns of different tables?
Is there any way to assign a nickname in 2 columns of different tables in SELECT? SELECT (a.coluna1, b.coluna2) as coluna_geral FROM tabela1 a LEFT JOIN tabela2 b ...…
-
2
votes1
answer396
viewsInsert an Array, regardless of the amount of $_POST
For example, a person adds many Images to be published. She can add 4 images as well as can add 10,15,1,3 and etc. How would the QUERY? Form POST array: array ( [IMG1] =>…
-
2
votes1
answer1215
viewsEdit records of a field clientdataset from a Join
I have a simple example, but in three layers, with sqldataset + datasetprovider + clientdataset. I do not load any field in sqldataset. In datasetprovider I leave the updatemode in upwherekeyonly.…
-
2
votes2
answers810
viewsWhich jQuery event to use for database query?
jQuery(function($){ // Chamando as funções $('#busca-cidades').keyup(function(){ ... I am making a query in the database and returning this query formatted with html/css and the query is in…
-
2
votes2
answers15045
viewscount how many days a date range has in another date range
Good morning, I’m doing a query (mysql) and I have four dates periodo1inicio, periodo1final, periodo2inicio and periodo2final. I need to count how many days of period 2 is contained in period 1. Can…
-
2
votes1
answer462
viewsMysql - Selecting columns from a dynamic subselect
Doubt: How to select and add dynamic fields? I have a dynamic consultation: SELECT * FROM ( SELECT @TotalSpendMensal ) AS t The result of the variable @Totalspendmonthly is dynamic, ie returna for…
-
2
votes2
answers42
viewsDoubt Mysqli Parameter new_link
The old PHP function mysql_connect possessed the parameter new_link which allowed connection to several different banks in the same script: Example: $connect =…
-
2
votes2
answers126
viewsRemove last table item and reset a new item above the first
How I would remove the last item from a table by selecting the last four. Ex: +-----------------+--------+ +------ ITEM -----+-VALOR--+ +--------------------------+ 1: FulanoA + está online 2:…
-
2
votes3
answers1636
viewsDownload Counter
I wonder if someone could help me do the following: I have a download site where I want to do a download counter for each page and when clicked, update the number of downloads on the page…
-
2
votes1
answer40
viewsMysql Data Entities with Mysql Data 5.3.7
I wonder if there’s any way to use the MySQL.Data.Entities with the version of MySQL.Data 5.3.7. In the specification here speech that works with the MySQL.Data (6.4.4.0). Is there any other way to…
-
2
votes2
answers118
viewsmysql deprecated
I’m trying to insert an Row in mysql but is returning it: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO…
-
2
votes1
answer72
viewsGenerate these Results in PHP Mysql
I wonder how this kind of result is generated... How it is formatted this way. Mes/Ano | Vencidos | A Vencer | Vencendo 01/2015 | 5 | 0 | 0 02/2015 | 1 | 0 | 0 04/2015 | 15 | 0 | 0 06/2015 | 7 | 0 |…
-
2
votes2
answers841
viewsHow to add a field of a given ID with multiple records?
The story is this: a politician can vote for several zonas, therefore the reason for the same ID candidate contain multiple records within the table. The ID_CANDIDATO being 120000000171, he having 6…
-
2
votes1
answer943
viewsBring "children" record count along to all table records
How do I count how many "children" such a row have, and at the same time list all the records in the table? I have the table categorias, with the following data: _________________________________ |…
-
2
votes3
answers2111
viewsConvert date format DD/MM/YYYY to YYYY-MM-DD stored in a scan
The field data is the type of varchar, in the month of June the date format is DD/MM/YYYY, but wanted to change it to YYYY-MM-DD since it is the format that Mysql accepts and to follow the current…
mysqlasked 9 years, 4 months ago chocolatemontana 573 -
2
votes1
answer167
viewsHow to keep data up to date in two tables?
There are two tables that should be kept updated in different databases, "user" of the "DB1" and "user" of the "DB2" database. In this case, it would be the "password" field to be updated. I have a…
-
2
votes0
answers101
viewsProblem with multiple notifications
Good night. I have a notification system where users receive notifications from users of who they are following. For example, "João commented x posts" And it’s working when, for example, there’s…
-
2
votes2
answers108
viewsC# and Mysql with Aspnetusers, deleted tables
I am developing a system with C# (MVC) and Mysql. Everything works perfectly well when using my local database instance. I duplicated this database on Uolhost and that’s when something bizarre…
-
2
votes2
answers444
viewsToo Many Hibernate+Mysql Connections error
I have an application in development in Java using Hibernate and Primefaces, on the item listing screen I have the option to do a search for some information in real time using multiple filters.…
-
2
votes2
answers161
viewsAdd a fixed word to a friendly URL
Good night, I’m doing some research and I’m having a problem passing the value that is written on input to another page where the result will be displayed. Example Url I’m trying to pass values…
-
2
votes1
answer507
viewsHow to import mysql data with VBA without defacing text
I have a macro that connects to mysql and executes a query that is in text file and adds the records in an excel spreadsheet. It turns out that the text is disfigured. Example: Correct: CALL QTDE…
-
2
votes1
answer44
viewsSelect records in order
I’m making a virtual store from scratch and the customer asked me to make the following logic: Select first available products with photo Then select the available ones without photo Then select…
-
2
votes2
answers600
viewsHighlight term searched in bold with or without accent
Hello friends would love your help a lot. I am trying to highlight the words typed in bold in the search. the code below works only if you type "Brazilian selection" more if you type "Soccer…
-
2
votes1
answer73
viewsProblem with different encodings between databases
I am creating an application that needs to take some data that is in an SQL Server database with iso-8859-1 encoding, and insert into a Mysql database with utf-8 encoding. A few words with accents…
-
2
votes2
answers2629
viewsHow to login with php and Session on Ionic?
I’m making a mobile app with ionic and I have to log in users from an external database, I need to know how to log in via php and create a session with id user’s ?