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
-
0
votes2
answers51
viewsError registration report on method return
I’m having a problem I haven’t been able to solve in over a week. I wish to make a registration report for a particular website. In the report, I want to list the cities and their total…
-
0
votes2
answers846
viewsDuplicate values in php
I have a table in the bank called toy, inside it I have the columns name, total, quantity available and amount donated. But I want to show only the name, total and total amount donated. When I use…
-
0
votes1
answer2759
viewsReturn database records using jquery ajax, php and mysql
I am beginner in jquery and would like a help to the following situation: In this field: <input type="text" name="colaborador" id="colaborador"> How would you do where, for each typed letter a…
-
0
votes1
answer29
viewsSearch between dates in 2 columns of the same table
Colleagues. I have a table that brings the beginning and the end of an event. InicioEvento = 2016-06-01 07:00:00 FimEvento = 2016-12-31 00:00:00 I know if I use BETWEEN, I can search between dates,…
mysqlasked 8 years, 4 months ago user24136 -
0
votes1
answer4352
viewsDoubt how to use IF in a TRIGGER in mysql
Hello! My problem is the following I have two tables, a table called notes and another call students. I need to make a comparison with the id_student on the table notes and the id present in the…
-
0
votes1
answer61
viewsHow can I select by date and hour
Well what I intend initially is to do a while that shows me all the results of my column reserves. However I want to make a select that shows me the nearest days and then the nearest hours. The name…
-
0
votes0
answers120
viewsOutdated data in Hibernate + JPA queries
I noticed a problem in my Spring application, I am implementing an internal messaging service and when creating the display of the amount of unread messages I realized that the value varied with…
-
0
votes0
answers88
viewsAccess error when calling login page - PHP Generator
Recently the locaweb did a maintenance on their servers and after that some pages of our hosting stopped working, I use a framework called PHP Generator for Mysql Website of the Framework Developer…
-
0
votes1
answer45
viewsAssign an Arttigo in more than one php category
I have to enter a register in the database assigned to more than one category , how could I do this ? In case would appear the available category options in my bank and I would select them with a…
-
0
votes1
answer71
viewsCase sensitive MYSQL
I need my bank to accept capital letters in the table names, for example at the time I create the table tbl_ALGUMACOISA she appears to me tbl_algumacoisa So it also works with the fields, as I must…
mysqlasked 8 years, 4 months ago Renan Rodrigues 3,709 -
0
votes2
answers134
viewsSelect in table records with Mxn relation
Hello, I have in my bank a table tb_usuario (id INT, name VARCHAR, flag_active INT) and a table tb_regional(id INT, name VARCHAR,login VARCHAR, password VARCHAR). From the relationship between the…
-
0
votes2
answers1453
viewsIndex views in Mysql
I have a view in my Mysql database, I would like to know if it is possible to index the fields that are contained in it, because I have a group by on it that is consuming much, and a index would…
-
0
votes2
answers418
viewshow to get a correct sequence in order by mysql?
has a sequence of numbers 1 to 20 I would like to know if you have the correct number sequence for example: 1,2,3,4,5,6,7,8,9,10,11... like this query select * from table order by numero asc; he…
mysqlasked 8 years, 4 months ago Humberto Costa 21 -
0
votes1
answer228
viewsSelect checkboxes that come from the database in the edit form
Hello, I have a user editing form that has some chekbox with city names that must be selected when the form opens. Well, I am selecting in the database the cities to which the user being edited has…
-
0
votes1
answer325
viewsHow to work with AES_ENCRYPT and AES_DECRYPT
I’m having trouble encrypting and decrypting data. I used the following direct input in mysql insert into interditado (usuario_id, nome, data_cadastro) values (1, AES_ENCRYPT('Zé da…
mysqlasked 8 years, 4 months ago fabricio_wm 1,090 -
0
votes1
answer193
viewsSave all PHP results to a single HTML table
On my host there is an index.html with a form that is linked to a login.php that takes the results that the user typed and saves in an HTML table at the site root. The problem is that a table is…
-
0
votes0
answers22
viewsIs it possible to make the encoding of a Mysql database equal to the encoding of a PHP/HTML5 page?
For example, in my table in Mysql the word appears Creditworthiness and in the bank "Crã dito", Valid until on the site appears as "V read until " in the bank. I am using in HTML5 the UTF-8, in the…
-
0
votes2
answers240
viewsINSERT CONCATENATE PHP MYSQL
I am wanting that when entering a register in mysql , according to the id already have something predefined example I will insert a post with the category id = 2 , then the name of my post will be…
-
0
votes2
answers256
viewsRails and Mysql - Data Types
I started using Ruby on Rails recently for a project, and have doubts about scaffolding and other DB features present in Rails. Here’s a topic explaining data types in Active Record Migration…
-
0
votes0
answers340
viewsexceeded the 'max_user_connections' Resource (Current value: 3)
Good evening, everyone. Dude I hate this mistake and I have no idea how to fix it. I’m closing the connection with the bank after every request but still. I am using PHP. Someone knows how to fix…
-
0
votes2
answers57
viewsDo a search for my site in two tables
I need to do a search for my site in which I returned first the companies that have something similar to typed and, right below, show all registered products with something similar to typed. I have…
-
0
votes1
answer74
viewsWhat to do after mapping?
I want to make a system to place and search data in a database. It is an agenda that the user inserts the location, the commitment and the priority. So far, that’s it. I’ve already started mapping.…
-
0
votes1
answer1089
viewsIF conditional within SQL query
I have the following appointment: $string = " SELECT DISTINCT(idClientes), nome FROM clientes WHERE idClientes IN ( SELECT idClientes FROM planosclientes WHERE idPlanosClientes IN ( SELECT…
-
0
votes2
answers7477
viewsWarning: mysql_num_rows() expects Parameter 1 to be Resource, Boolean Given in
I have a problem with the job mysql_num_rows() "Warning: mysql_num_rows() expects Parameter 1 to be Resource, Boolean Given" I’ve been looking up other posts but none could help me. PHP is like…
-
0
votes1
answer63
viewsI want example of why replacing ' with '' and for parameters of a query is dangerous
I see many posts on this subject, but I do not see any example that has fit for this my case. function sanitize($value) { $val = str_replace("'", "''", $value); $val = str_replace("\\", "\\\\",…
-
0
votes0
answers37
viewsIs it right to identify the columns in the database tables?
I have a question: In large projects, which require a lot of relationship between the tables, many Joins, identify each column with the table, for example: Instead of: Table name: users id | name |…
-
0
votes1
answer898
viewsHow do I add all the values of a PHP column
Good is so me in my users table, I have the balance column, how do I add the balance of all users, ie the balance of all records in the table with PHP? Thank you.
-
0
votes1
answer894
viewsForeign key registration query with multiple occurrences
I am developing a system for storing documents for everyday use with PHP and mysql and for easy queries I added tags to these documentations and to ensure the integrity of the data I added another…
-
0
votes0
answers78
viewsJavascript button perform action in php
Hello. I have a question :/ I’m making an anime site, with posting and etc, at first I thought I could do everything in javascript, however, now I had to use php to access the Database and etc.…
-
0
votes0
answers903
viewsPersist field blob with file extension - JPA, Hibernate
I need to persist an attachment as a pdf, xls, etc. (type field blob). I need to recover this file after persisting it and I don’t want it to be necessary for the user to inform the file extension.…
-
0
votes2
answers105
viewsPrint results in a feed interspersed with horizontal spaces (blank line)
I set up a news feed that reads the information in a database, but I need that instead of each line being printed one after the other, I need to be given an interval between each print with a blank…
-
0
votes1
answer856
viewsExport and Import Mysql Table
I have a Wordpress plugin, which can be used on multiple blogs with the same configuration. I have two tables in it: wp_tabela_um and wp_tabela_2 How can I create a button to export these tables and…
-
0
votes1
answer438
viewsSAT Cfe Fiscal Database
I am developing a web application in PHP, someone who has already made a system that emits SAT can inform me if it is necessary that the user owns the SAT database, or a copy of it, on the local…
-
0
votes1
answer1026
viewswrite files to the database with ajax + jquery
I’m not being able to save data in mysql database with ajax, can anyone help? Not error or anything, just not saved. PHP: $serve = mysql_connect('localhost', 'root', ''); if(!$serve){ echo 'erro';}…
-
0
votes0
answers75
viewsGenerate PHP table with specific data for Mysql
I have a table in a Mysql database, and I need to generate a table with PHP, but it is not a trivial table. My table has the following fields: codigo, item, preco and quantidade. I need to generate…
-
0
votes1
answer2180
viewsChange the colors of google Charts
I’m using google Harts generating 4 pizzas. How do I change the colors that appear ? Follows my code: <?php include("conn_user.php"); include("conn_sys.php"); if (!isset($_SESSION))…
-
0
votes1
answer49
viewsWhy a Stored Procedure generates different results if run in Workbench and Java with JDBC
I have a Stored Procedure in Mysql that is working normally when running from Workbench, but by running this same procedure in Java/JBDC I am getting wrong values and different from those obtained…
-
0
votes2
answers135
viewsPicking wrong id when selecting line with Checkbox
In this script below I make a loop in rows of a table, where it contains in each row a checkbox and hidden inputs. The problem is that when I select a few lines with the checkbox, the values…
-
0
votes0
answers1189
viewsSelect SUM within another select MYSQL
This query is already working: SELECT itens.setor, xregras.nsetor, itens.grupo, xregras.ngrupo, itens.conta, xregras.nconta, itens.dotacao, sum(IF(tipo = 'ES',total,0.00)) as efetivado, sum(IF(tipo…
-
0
votes0
answers39
viewsChange the value of var and load php page
onchange doesn’t work, it just works on the first selection, then it doesn’t. ideas ?? function getComboA(sel) { $(document).ready(function(){ var id = sel.value; $('#frontend').bcp({ 'ID': id,…
-
0
votes0
answers29
viewsReturn database result with password only
It is possible to return something from the Mysql database only with a "password"? I have two names "so-and-so" and "Ciclano" so-and-so is birthday day 11/07, So-and would have to put his name and…
-
0
votes1
answer195
viewsBecause my LIMIT does not accept variable
ERROR: it simply does not query when playing on a foreach because LIMIT does not become the variable I declared Does anyone know me? $cont = 2; $stm = $pdo->prepare('SELECT sol_camiseta.id,…
-
0
votes1
answer470
views -
0
votes2
answers3812
viewsConvert Currency Values to Decimal?
I have three values that are being passed via POST to be recorded in the database, I try to record the data but it records with wrong values. The data is like this: "valor_liquido": "R$1.000,00",…
-
0
votes1
answer44
viewsHelp with php and json
I’m having trouble properly displaying in JSON, a result originated from two tables in my database. The situation is as follows: I have orders in a table (A) and the products in that order in…
-
0
votes2
answers688
viewsExpandable Table how to do Double select?
In this script a have an expandable table showing by GROUP by nome , that when we click on the line, it will expand, showing a second table listing all the lines referring to the GROUP by nome.…
-
0
votes1
answer712
viewsDistinct does not work
People, someone can tell me why this query doesn’t work. In fact it works, but brings the values wrong way (duplicating the department field), as if distinct does not work. select distinct…
mysqlasked 8 years, 3 months ago Eduardo Santos 754 -
0
votes2
answers38
viewsList of Tables
Creating my Migrations in Laravel I came up with the following question: I have these two tables: Used ID NOME_MARCA_ID MODEL YEAR BRANDS ID NAME in Migration to keep the brand ID I would do so:…
-
0
votes1
answer91
viewsUndefined index JSON Android
Hi, I’m making the following mistake: I am developing an application that checks a table of an external mysql database by sending the device’s IMEI returning a hardware id, but when debugging the…
-
0
votes4
answers842
viewsWrite MYSQL data in en / UTF8 format
As I do to save data in the database in Brazilian format with accents, I used it in connection mysqli_set_charset($conexão, 'utf8'); but now my code is all in PDO as I do to save this data in utf8…