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
votes2
answers91
views -
2
votes3
answers877
viewsDoubt in Insert, update and delete with Codeigniter Framework?
I have a question related to insertion, alteration and removal of records in the Mysql database. For example, imagine a banknote table, where all the information in that note is recorded, such as…
-
2
votes1
answer589
viewsHow to upload PHP data from a Form with text and image support?
In my project I have on a page a form for data collection that will be inserted in the database and in a folder of the server. My problem is that in this form I have a support for uploading images.…
-
2
votes2
answers125
viewsShow date field information - php symfony
I have a table in the database with date type data, the dates in the database are in this format: 2009-09-10. I’m trying to bring them via the symfony json this way: linha 7: date("d/m/Y",…
-
2
votes1
answer111
viewsHow to make this sql
I have the following table: I use a command SELECT, guy: SELECT estudante, conceito_1, conceito_2 FROM estudante WHERE etapa = '1ª' How could I make a single select to catch the 2nd and 3rd steps…
-
2
votes1
answer684
viewsHelp for - Optimize Mysql
I’m having trouble optimizing my VPS Mysql that I use. I have a plan on Ramnode with the following specs: Intel® Xeon® CPU E3-1240 V2 @ 3.40GHz (4 Colors) 4GB of Ram 135 GB SSD Raid 10 I am having…
-
2
votes1
answer476
viewsWeb Service Java in Openshift using Tomcat 6 (Jboss EWS 1.0)
I’m trying to create a Web Service in JAVA so it can be consumed by an Android application. I need to use a Cloud technology, and only found the free Openshift and best recommended for now... Well,…
-
2
votes3
answers2837
viewsStore multiple checkboxes in a single column with PHP + Mysql
I’m having trouble storing multiple checkbox in the same table field. In this case, by filling in the form and marking more than one checkbox, it stores only the value of the last checkbox. Here are…
-
2
votes1
answer89
viewsUpdate of multiple Images
My code is currently doing its role well by uploading and putting the watermark on the upload images, however I would like to be storing the names of all images in the database. $idnoticia =…
-
2
votes2
answers180
viewsAddition of multiple items
I would like to know how to make this my code work to insert data in Mysql multiple way. In the first file applies in the case a repetition of 5 items, the problem is that I do not know if I did the…
-
2
votes1
answer793
viewsadd values from one table and put the result in another
I have a table called players and I need to add the values of the column points but only those that have the same account_id and after placing the result in another table called Accounts in which…
mysqlasked 9 years, 3 months ago Richard Nunes 23 -
2
votes1
answer2109
viewsQuery in mysql with php does not return result in queries with accents
Hello I have a system in php/mysql using zend 1.12, but when consulting the mysql database with a word that has no accent and in the table has accent, does not return any result for example: when…
-
2
votes1
answer41
viewsProblem with selection in Mysql
Guys I’m starting in this business and having difficulty in selecting in more than one table. My selection command was as follows: Table 01: select * from veiculo;…
-
2
votes1
answer996
viewsHow to send message only to a user with Websocket
I have a live chat app with Websocket, but at the moment it sends messages to the entire group, I would like to know how to send to a selected user, in case when I click the user (from a list that…
-
2
votes2
answers473
viewsSELECT with CASE runs on phpMyAdmin but does not pass in PHP
I have a problem with an SQL that runs perfectly in phpMyAdmin, but does not run the query to the database by PHP. Query copied from phpMyAdmin’s SQL field: SELECT `idforma_pagamento`, `habilitado`,…
mysqlasked 9 years, 7 months ago Reinaldo Anício 21 -
2
votes1
answer905
viewsDisplay foreign keys from a table in the query
I have a table where each projeto may be related to up to 4 produtos. Main Table (foreign keys): IDPRODUTO IDPRODUTO2 IDPRODUTO3 IDPRODUTO4 Table produtos ID NOME To perform the display, I created a…
-
2
votes1
answer370
viewsPDO Selection in mysql database parameter BLOB
I am having trouble trying to rescue one or a list of images that I have already inserted in mysql 5 with PDO. I have a dao class that has the architecture of my querys to work with the database.…
-
2
votes3
answers513
viewsHow to put the last row number of a Mysql table into a variable
I would like to know how to take the last row of a Mysql table, and put this number inside a PHP variable. I tried so: require_once "../../models/conex.php"; $sql = "SELECT * FROM tabela ORDER BY id…
-
2
votes1
answer59
viewsWhere pelo select
How do I make the data referenced to select 'result' return only those containing the value '1' SELECT DATE(m.data_marcacao) AS data, nome_operacao operacao, f.cracha_funcionario,…
-
2
votes1
answer36
viewsSelect by selecting the attendant below the call media
Good morning, Estos trying to make a select to select only the attendants who have the number of calls below the media. It seems simple, but I’m not succeeding, I’ve tried many ways... Do not have…
mysqlasked 9 years, 2 months ago Diego Marquez 320 -
2
votes1
answer76
viewsReplace if loop is empty
Good people, I have a question because I was a little "stuck" not knowing how to do it. I have the following code: <? foreach($data as $index => $row) { $className = $index % 2 == 0 ? "class"…
-
2
votes2
answers115
viewsSecurity MYSQL Android
I’m doing a login system. But I’m in doubt: I connect to the database through PHP? I mean I would just open the link and the Server would execute the procedure? or do it directly from the app via…
-
2
votes1
answer111
viewsUpdate does not work in database
Good staff, had already made a topic here about it and solved it right away, but then I noticed that when I fixed this problem I got another one. Here is the code: <? error_reporting(0);…
-
2
votes1
answer8737
viewsHow to fix "Sqlexception: No suitable driver found" error while making a connection?
I am trying to make the connection to the database in my code, however it appears the following error: Exception in thread "main" java.sql.Sqlexception: No suitable driver found for…
-
2
votes1
answer2120
viewsError mysqli_connect(): (42000/1044): Access denied for user
This code is going wrong. Warning: mysqli_connect(): (42000/1044): Access denied for user 'u469236901_roota'@'10.2.1.41' to database 'u469236901_sysU' in…
-
2
votes1
answer1230
viewsCount and Display Records from different PHP/MYSQL tables
GOOD AFTERNOON. I am creating a report to tell and display: - the number of men and women (table: Customer) who made booking (table booking) at a hotel in a given period of time (passed via form).…
-
2
votes3
answers3569
viewsHow to find relationship and cardinality in Mysql?
The image below shows a relationship between two tables created from Mysql Workbench. What I need to know is how I can find this information inside the database. I need to know exactly what kind of…
-
2
votes1
answer88
viewsHow to protect a service site before launch?
I have no experience in this and I’m about to launch a service site and I was wondering if what I have to do to protect my idea is her patent, software registration or trademark? These are the…
-
2
votes1
answer235
viewsSearch without having to SUBMIT
I have the following code and I don’t know how to make it search without I need to give Ubmit, someone can help me? HTML <html> <head> <title>Data Searching Without Page…
-
2
votes1
answer572
viewsUsing Foreign key with Cascade
On my system, when deleting a post, all comments that have the id_publicacao same as the publication are deleted from a table called comentarios_publicacao. And I do it simply by doing a check like:…
-
2
votes1
answer133
viewsProblem with session_set_save_handler
I’m using the session_set_save_handler to save the session to Mysql, but an error has been troubling me. When I log in to IE with a user, then close the browser without giving logout and log into…
-
2
votes3
answers9183
viewsHow to reset Mysql auto-increment?
Guys, how do I reset the auto increment of Phpmyadmin? I tried already ALTER TABLE `table_name` AUTO_INCREMENT=1 But it didn’t work
-
2
votes0
answers64
viewsEnable Federated
I need to enable the Federated plugin in mysql. I am adding the Federated in my my.cnf file when I check by the Engines show; it says it is not enabled. I’m using Mac OSX 10.11 and mysql 5.2.26. Any…
-
2
votes2
answers303
viewsCache Problem - Writing database data to Java system
I have a system developed in Java using JPA, Hibernate, Primefaces. When I write system registration reflects in the Mysql database normally, until here OK, but when I do unlike the database…
-
2
votes1
answer31
viewsHow to concatenate strings with values from a database?
I want to concatenate values from different records, for example, I have the table below: | id | value | | 1 | valor1 | | 2 | valor2 | | 3 | Valor3 | To show the following result: value1, value2,…
-
2
votes1
answer1150
viewsProblems with SELECT option with PDO
Friends reissued the PDO connection below: <?php $conn = new PDO( 'mysql:host=localhost;dbname=pbfjacar_site' , 'pbfjacar_murilo' , 'smc100164' ); $stmt = $conn-> prepare('SELECT font FROM…
-
2
votes3
answers852
viewsFunction does not return value
Colleagues... I have a method that brings the results of a table. So far so good. What is intriguing me is that after I changed server, the structure of this method is the same for two other results…
-
2
votes1
answer979
viewsPrevent duplicate registration with PDO
I’d like to prevent the same source from registering for duplicities. The code used for registration is below: <form name="enter" method="post" action="" enctype="multipart/form-data">…
-
2
votes2
answers1223
viewsHow to get all data from one table based on another table?
I have a countries table and another table with continents that has as FK the id of the countries table and I needed to return all countries of Europe. Can anyone give a help on how to do this?…
-
2
votes1
answer117
viewsHow to fill null with previous row value?
Looking at the following table, I want to fill the null value with the value of the previous row, which is best to do with mysql?…
-
2
votes2
answers757
viewsNULL value in database x performance
I always used database (Mysql) for small projects and never cared about the option "NULL when empty", IE, was blank even. Now I’m designing a big system, I’d like to know the concept of using value…
-
2
votes1
answer114
viewsDo not add field if column equals Mysql
Opa, I am adding up the total of a double column, what I need is that, the query does not add up this column if the Cod column is equal. Explaining better, the Cod column can be repeated, if it is…
-
2
votes1
answer1972
viewsPerform mysql query of two tables via php
Good afternoon guys. I have a problem that I don’t know how to solve anymore. I have the following mysql query in php: mysql_select_db("banco", $conexao); $resultado = mysql_query("SELECT * FROM…
-
2
votes1
answer141
viewsDEFAULT CURRENT_TIMESTAMP
Using the DEFAULT CURRENT_TIMESTAMP when a UPDATE this date will also be updated to the date of UPDATE? Or it and fixed inserted only once at the time of the INSERT?…
mysqlasked 9 years ago Rônald A. S 21 -
2
votes1
answer103
viewsDatabase stops working after a few hours
Hello, in this registration system, I get the information entered and play in a database. include("connection.php"); require("blowfish.php"); $login = $_POST['login_cadastro']; $senha =…
-
2
votes1
answer2422
viewsBootstrap dynamic menu with PHP and Mysql
I have in mysql two tables (subjects and pages), the table pages has a field (assunto_id), which relates which subject is that page. I would like to mount a menu with submenu in bootstrap This is…
-
2
votes2
answers346
viewsSearch in mysql database with multi-level php
I’m trying to perform the following query in the database, through an html form, only in php I’m only able to fetch all the data from my table. In case the user would choose the type of filter and a…
-
2
votes1
answer45
viewsBank query for another variable
I have the following scenario, I perform a query to the bank and return all data: <?php include ("conectar.php"); $query = "SELECT * FROM pontos ORDER by pontos DESC LIMIT 0,10"; if ($result =…
-
2
votes2
answers2126
viewshow to select only 1 record of each id
After making an Inner Join between user (1) and image (N) tables, the following table is returned (the id refers to the user id and the filename to the image file): | id | filename | 12 | img1.png |…
-
2
votes3
answers3959
viewsINSERT INTO NOT EXISTS
I need to create an INSERT where it is checked if the value already exists. I looked at some posts, but I am not able to execute. INSERT INTO `pagina_extra` (`ID_PExtra`, `ordem_paginas`, `id_menu`,…