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
votes1
answer94
viewsMy application does not change database data
I’m developing a software for a video rental company with MVC. There are two problems: not changing people’s attributes and displaying the following error: java.sql.Sqlexception: Column 'code' not…
-
0
votes1
answer330
viewsError: You have an error in your SQL syntax
I am developing a software for a video rental with Pattern MVC (Model-view-controller) design and the problem of not changing people’s data is occurring. When I change the person’s data displays the…
-
0
votes2
answers2710
viewsTake random value mysql
I would like to know some way to get some random value from Mysql without repeating, I am using this line: $query = mysql_query("SELECT * FROM users ORDER BY RAND()"); but it repeats quite a lot of…
-
0
votes3
answers268
viewsUse reference in MYSQL query condition
I am doing a query to calculate the balance and after calculated I want it to bring only the products whose balance is equal to 0 so I tried to assign the total value using the AS only when I went…
mysqlasked 9 years, 6 months ago Silvio Andorinha 8,394 -
0
votes0
answers41
viewsAccent problems in PHP and Mysql
I inserted accented data in the database and when I will list with php it returns me the items as follows How can I resolve this? Thank you :) Ah, I’m using the latin1_swedish_ci collation in the…
-
0
votes1
answer84
viewsSet mysql variable with the name {parametro1}
The way to set a variable in mysql is like this: SET @variavel = valor In the Documentation says that the variable name may contain other characters, in which case it should be set like this SET…
-
0
votes1
answer27
viewsDoubt with column Bank
I received a mysql dump for study and I was doubtful in a certain text column with the fields filled in this way: 'a:5:{ s:9:\"user_data\"; s:0:\"\"; s:4:\"nome\"; s:5:\"admin\"; s:2:\"id\";…
mysqlasked 9 years ago Thalles Daniel 782 -
0
votes1
answer20
viewsUpdate Page If Query Return False
Guys, next I have this appointment here $consultapedidos = mysql_query("SELECT * FROM pedidos WHERE produzido = '0'"); if(mysql_num_rows($consultapedidos)==true){ while($lnped =…
-
0
votes1
answer1811
viewsCorrect way to return the number of results using Codeigniter
I wrote 2 possibilities to return the number of results using Codeigniter, follows: public function get_num_indicados($id_usuario) { $query = $this->db->query("SELECT count(id_patrocinador) as…
-
0
votes2
answers333
viewsMaking multiple SQL inserts, multiple Inserts
Good evening to all, once again I live my Alans heel with the blessed sql... I want to insert data in two tables... client table and address. I take the sql below, fill the variables and run the sql…
-
0
votes1
answer80
viewsInsert into with waiting time
I have a form that his action sends to a.php file that makes an Insert in the database with the information passed by the form, and I’ve noticed that if I double click very quickly on the Ubmit…
-
0
votes1
answer654
viewsError to import mysql table into phpmyadmin
I have a problem to import a table in phpmyadmin. Table: CREATE TABLE ManterEmpresa ( IdEmpresa INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, CNPJ INTEGER UNSIGNED NOT NULL, NomeEmpresa VARCHAR(45) NOT…
-
0
votes4
answers2818
viewsEmail falls into PHP spam box using HTML layout
I registered three emails in my database, but when I send the email it falls into the spam box. I don’t know what I should do not to fall as spam. In case the content of the email is an email…
-
0
votes1
answer185
viewsOrder By Hibernate in JSF
Hello, good afternoon, I am a beginner in this web world and I need to order establishments by punctuation (the best punctuated at the beginning, LOGICAL) The mistake is An Error Occurred:…
-
0
votes2
answers43
viewsBring select in a row with 2 references
Good afternoon, I wonder if there are possibilities to bring everything in a row with the following tables: Pedidos id id_produto1 id_produto2 id_produto3 Produtos id produto I would like to make a…
-
0
votes1
answer204
viewsMysql beginner with a lot of difficulty
Guys, I wanted to start learning MySQL, but I’m not getting started, I don’t understand the software or anything, the web tutorials don’t talk about MySQL in Mac, only in Windows. I downloaded the…
-
0
votes1
answer155
views -
0
votes1
answer665
viewsShow DB information via combobox
I’m a few days searching the internet and I don’t know if I’m looking the wrong way I just know I can’t find what I need. Next: I would like to click on one of the options in the Combobox (or…
-
0
votes1
answer77
viewsCan someone help me with the GET function?
Making a shopping site, then have the products table and order table, where after the person buys something writes in the orders table, but wanted to record the product id in the orders table, how…
-
0
votes1
answer62
viewsProblems while recovering Mysql data
I am trying to recover data from Mysql database for a form, I managed to recover some data but others display - Resource id #7/#4 PHP: @$id = $_GET['v']; $res=mysql_query("select * from login where…
-
0
votes0
answers16
viewsQuery a user of a php program to a database for a period specified by it
I have a database in phpmyadmin. One of the fields is "Data" in "date" format. Do I need to ask the database user a question, through php, so that through "imput" the database data are listed in the…
-
0
votes1
answer570
viewsThe form does not send data to the database
I created a discussion topics registration form. Discussion topics are linked to a category via a foreign key. Then, if I click on a category, a list of topics appears. What I want is to be able to…
-
0
votes1
answer146
viewsReport of Wordpress users
I need to pull up a report with the information Name, City, Store Type and E-mail that were registered from a registration form. Is there any plugin that I can pull this report with this…
-
0
votes1
answer708
viewsSubtract MYSQL Dates
I want to delete from the table users with the same name, but only those that the difference of the database date and the current date (at the time of select) are for example, less than 5 minutes.…
-
0
votes1
answer917
viewsHow to create an insert Trigger
I need to assemble a trigger so that every time you insert a data into a table usuario, automatically insert the same data into another table bkuser. How can I do this? PHP Usage. And how do you…
-
0
votes0
answers194
viewsHow to loop within a variable in Javascript?
I have a page index.php. In it has a loop which collects row by row from a mysql database table and inserts into variables that are sent to the file dashboard.js where the code is below. var…
-
0
votes1
answer899
viewsLike SQL with multiple fields
I want to make a select for a search of five fields (position, training, sex, schedule, photography). But it is not working. Could someone tell me why? <?php $cargo = $_POST['cargo']; $formacao =…
-
0
votes1
answer55
viewsMysql, number of rows in a table with values from another table
today I have a question maybe a little basic but my mysql ta a little rusty. I have 2 tables one with the users' names is another with a mailing list and wanted to know how many messages each user…
-
0
votes1
answer713
viewsMysql - Derivative Value Triggers
I looked it up and couldn’t find it anywhere. I am starting in Database studies and need the following help: A table Gang has the following structure: Id_class(auto incrementable)…
-
0
votes1
answer55
viewsConnection between 3 tables to rescue information, sql
I have 3 tables with this structure I tried but could only enter two tables, but I would need it to be in the 3 to "save/clean" code. it is necessary to enter the table helpcenter_topics catch a few…
-
0
votes2
answers47
viewshow to limit sql column information
good evening, in a script I use added this string to get some information, <div class="col"><b><?= $this->lang->line('imei');?>:</b>…
-
0
votes1
answer683
viewsProblem reading property file
I created a propertie file for the database to read this file from there but the console presents me the following error: Erronull\properties\conexao.propertie (O sistema não pode encontrar o…
-
0
votes3
answers62
viewsError giving a select in two tables
I’m trying to make a select on these two tables, but this bringing wrong data, I want to do the following, list the loan requests that have not yet been rented, ie if the codigo_socio within the…
mysqlasked 9 years, 5 months ago Carlos Leandro Ferreira de Alm 339 -
0
votes5
answers3030
viewsCodeigniter -> Message: Trying to get Property of non-object
I’m trying to fix this bug: Severity: Notice Message: Trying to get Property of non-object Filename: contracts/view.php Line Number: 37 CODE: contratos_model.php public function getById($id){…
-
0
votes0
answers119
viewsOptimize SQL Code
I wonder if the one way I can optimize this sql code (mysql) that I did, the search is too slow, taking too long to bring the selected fields, I’ve done some tests but it’s still the same. SELECT…
-
0
votes1
answer26
viewsReturn of Equal Employee
I have the following code $sql = " SELECT c.*, cl.razaosocial, cl.idCliente FROM chamada as c, cliente as cl WHERE c.idCliente = cl.idCliente"; $consulta = $this->db->query($sql)->result();…
-
0
votes3
answers125
viewsmysql UPDATE, does not receive function value in PHP
I have that function: $id = pega_assunto_por_nome_menu($_GET['assunto'])['id']; That returns the id value if you use echo $id; But when I update to mysql, it doesn’t work. This error appears: You…
-
0
votes2
answers345
viewsHow to translate the Mysql query that has a sum to Hibernate?
I need to translate the following query from Mysql to Hibernate: select sum(TOTAL_MERCADORIA_BRL) from PROCESSO group by PERIODO like 'DEZ-15'; What would be the best way to do this query, but using…
-
0
votes1
answer39
viewsLabel Indefinite Graphic with Flot and PHP
Using Flot to generate the graphics in pie format, the graph is generated with the values in percentage, but the Labels are displayed with 'Undefined'. $(document).ready(function () { var chartError…
-
0
votes1
answer295
viewsTrouble with Hibernate
I’m trying to learn about Hibernate together with a tutorial making an app for a petshop and I’m having the following problems: INFO: HHH000228: Running hbm2ddl schema update dez 16, 2015 8:34:52 PM…
-
0
votes4
answers352
viewsError inserting json in Mysql with PHP
I have a code PHP which causes an array to become jSON <?php $imagens = array('imagem1.jpg', 'imagem2.jpg', 'imagem3.jpg'); $json = json_encode($imagens); $inserir = mysql_query("INSERT INTO…
-
0
votes2
answers258
viewsMysql, selecting 4 related tables
I am trying to make a select on 4 different tables. They are all related. It all starts with the Resident. SELECT morador.* ,unidades.* ,grupo.* ,condominios.* FROM morador LEFT JOIN unidades ON…
-
0
votes0
answers39
viewsSave Arrayiterator to Mysql
I’m having trouble saving a list of items on ArrayInterator, where I need to save this data to the table by clicking a save button. Array code: <?php ... $p = new…
-
0
votes1
answer114
viewsDifferences between SELECT, Count and Empty to work DB data
I, out of curiosity would like to know the differences between 3 seemingly equal things to count (Rows, lines) and get data from a table, in Mysql/PHP: 1st: Return the number of Rows first, and only…
-
0
votes2
answers51
viewsPick up records that are there 3 days to win
I have a table called cotas that has a column ultimo_recebimento, in that column is the date in the form of time of the day that will be the user’s last receipt. I need to get all the records that…
-
0
votes2
answers114
viewsInsert Mysql error
Well, I’m trying to create a menu, and my sql is returning the following error: These are the results you’re picking up, so I gave an echo to see if it was going properly. Who we are is the name…
-
0
votes3
answers485
viewsError inserting data into Mysql - Codeigniter
I have the code <?php $chave = $retorno->resposta->cobrancasGeradas->cliente->cobranca->chave; $this->db->insert('boletos', array('id_fatura'=>$id_fatura,…
-
0
votes1
answer735
viewsHow to compare string to accents in php
I have a problem that I could not solve in php, I have a field varchar in the MySQL with accentuation, I rescue the same and use the htmlentities for the string to have the correct accent. I need to…
-
0
votes2
answers1258
viewsConnection between Mysql and Firedac closes the application when enabled
I have developed an application that uses Firedac to connect to Mysql. But when I try to open it on a station, at the time when the Connected := True, the application is closed, without returning…
-
0
votes1
answer1180
viewsSQL - Update without losing values
Good personal my doubt is the following I would like to update a value in the "Database" without losing the value there already allocated, Good for better understanding of my doubt I would quote an…