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
answer52
viewsDisplay links in sql query
In a database (Mysql) I have a column dedicated to electronic addresses (links). My problem is: often the same line can have multiple links. I would like to include the links in the bank in the same…
-
0
votes1
answer265
viewsDifferent divs in loop
I came across the following problem, with the code below I intended to add more fields without repeating the divs. Code: <? foreach($itens as $myrow){ ?> <div id="LISTA1_FUNDO_PRETO">…
-
0
votes1
answer1127
viewsLocked Mysql table
When trying to consult the table via phpmyadmin there is no return and gets locked. Not even trying to do a query with php it’s return. Any suggestions to resolve?
mysqlasked 9 years, 7 months ago Caio Fernandes 1 -
0
votes1
answer90
viewsMake Submit with <a> and appear JS dialog
<form action="" name="Insert" method="post" onsubmit="alert(1); return false;"> <a href="#" onclick="javascript:document.Insert.submit()" type="submit" >Eliminar</a> Good people,…
-
0
votes2
answers221
viewsProblem in database connection
I am changing a code from a news system that came with charset iso... Now I intend to change it to utf8. I have already managed to appear in utf8 on the page where the news are presented. Now the…
-
0
votes3
answers1664
viewsHow to Display SQL Query in an Array
I have a question. When I run a Select Count in the database it displays everything straight. But how to display it the same way using PHP? select country, count(*) as quantidade from customer group…
-
0
votes2
answers5590
viewsI cannot run Mysql Workbench 5.2 server
I am trying to connect to the Mysql Workbench 5.2 CE server to open a Ruby project. However, I cannot connect to the server (local). The following error appears: Can’t connect to MYSQL on…
-
0
votes1
answer139
viewsGenerate monthly graph
I’m putting together a monthly chart showing the sum of expenses and revenues per day, but the data shown on the chart is only the dates that exist in the database mysql. How could I display dates…
-
0
votes2
answers2925
viewsConsultation in table with self-relationship
I have the following table containing self-relationship between the idcategoria and parent columns: idcategoria categoria pai 1 Camisetas 0 2 Regata 1 When an added category does not have a parent…
-
0
votes1
answer161
viewsTrack #hash and create description from it [LOGICA]
I have come across this now and I would like to debate to make a logic. Well, nowadays it is used a lot the hashtags for everything in the main social networks, I almost never enter in Twitter and…
-
0
votes2
answers695
viewsSQL does not return all results that should return
I have the following tables in my bank: and wish to select all products of a particular site (this site is marked by the user through a checkbox) with the following sql: SELECT Eletrodomestico FROM…
-
0
votes2
answers86
viewsHow to take the file path and insert it into a table?
I need to create a Mysql statement that takes all the file paths of the files in a specific folder and inserts them into a Mysql table. For example, if my folder is called PastaTeste, I need…
-
0
votes1
answer125
viewsdelete record from an sql table
Good people I want to delete a record from a table but for that I need to get information from other tables and because of that I am not able to delete. I basically needed an SQL command that…
-
0
votes1
answer83
viewsMysql encoding
I have the data in the database, in the charset utf-8, and I want to export the listing in . csv, but when I give a select it returns the data so for example "Administraã§ã de Imã³veis e Locaã§Ã".…
-
0
votes1
answer905
viewsHow to create columns dynamically with SQL?
I’m running a script that returns 250 values that will be the columns of a database. I need to create the database if it doesn’t exist or simply truncate it and recreate all the tables to update…
-
0
votes2
answers882
viewsSubselect in the same column
I am trying to create a subselect in the same column, I have to use a column row to return a new value from the column itself.. follows my sql code SELECT `idUnidadeOrganica`, `NmUnidadeOrganica`,…
-
0
votes0
answers297
viewsSending of bulk emails
I need to send bulk emails with PHP, as I can do this without having to wait for PHP to finish sending the emails and then reload the page? For example, I have to send 100 emails, but I want to…
-
0
votes2
answers175
views -
0
votes1
answer459
viewsDuplicate entry '213' for key 'PRIMARY'
Where is the error? Duplicate entry '213' for key 'PRIMARY' CREATE TABLE IF NOT EXISTS `%%PREFIX%%shipping_vars` ( `variableid` int(11) NOT NULL auto_increment, `methodid` int(10) unsigned NOT NULL…
mysqlasked 9 years, 11 months ago feliphe felix 629 -
0
votes2
answers12040
viewsHow to store a pdf file in a Mysql database?
I am developing a project and one of my tables in Mysql will contain files .pdf. The table 'arquivopdf': + - - - - - - - - - - - - - - - - - - - - + | numerocotacao | arquivopdf | + - - - - - - - -…
-
0
votes1
answer993
viewsMysql does not connect to server
Hello, I went to enter the phpmyadmin and appeared this, where should be the problem ?? Code $coneccao = mysqli_connect("localhost", "root", "MINHASENHA"); mysqli_select_db($coneccao, "luppbox");…
-
0
votes0
answers652
viewsInserting double type value into mysql database
I have a Windowsform with a value field and I need to enter its value in the database. I need some example of how to do this? File that queries //Cadastrar Gastos public void cadastroGasto(Gasto…
-
0
votes1
answer453
viewsCalendar Per Week Page
I am developing a Specific Client Schedule But I’m not sure how to schedule a week. The schedule works much more do not know how to page now date_default_timezone_set('America/Sao_Paulo'); $data1 =…
-
0
votes1
answer1253
viewsHow to call two mysql tables in the same php page?
I’m new to programming for the web, and I’m having a hard time with this. I’m developing an advertising site and I need to call more than one table on the page. I made 3 Div’s advertising: Main,…
-
0
votes2
answers248
viewsMerge two tables into a third table
I need to merge two tables imagem1 and imagem2 in a third table imagens with SQL. They have exactly the same structure but with 1 query I can’t write all the data at once, so I need to make 2…
-
0
votes2
answers1586
viewsPercentage PHP and Mysql
I have a Mysql table where product type is stored. I would like to see the percentage of each product registered in the table. I did so: // Verifico o total de produtos cadastrados $sqlTotal =…
-
0
votes2
answers170
viewsWhile isn’t stopping when he should
I have the following code: <div class="row"> <? $tag = mysqli_real_escape_string($connection,$_GET['categoria']); $result = $connection -> query("select * from produtos where tags like…
-
0
votes1
answer77
viewsDoubt about 'NUMA' (non Uniform memory access) in Microsoft SQL Server
Someone can help me understand in English the concept of 'NUMA' and its characteristics? I have found sites in English etc, but I still do not understand!
-
0
votes0
answers272
viewsInner Join + Where in Mysql
How to use INNER JOIN with WHERE? I’m making a INNER JOIN with 3 tables. I need a WHERE to return only one record. I am trying as follows: SELECT `*` FROM (`tabela1`) INNER JOIN `tabela2` ON…
-
0
votes1
answer149
viewsWhy am I not able to do the INSERT in the database?
<?php class Connection { private $nome; private $data_nascimento; private $genero; private $rg; private $cpf; private $email; private $telefone_fixo; private $telefone_celular; private $cidade;…
-
0
votes1
answer531
viewsDeploy applications with Mysql
Does anyone know how to distribute the application and mysql database together? I’m using Innosetup, I can even install mysql, start the service but when I connect it gives error saying I can not…
mysqlasked 9 years, 10 months ago Fabrício Mendes 843 -
0
votes1
answer390
viewsHow to select tables by prefix [MYSQL]?
I have 20 different sets of tables inside the same bank where each of them corresponds to a virtual store. Since my tables are organized by prefix, how can I select all tables of a certain prefix to…
-
0
votes1
answer139
viewsDAO layer with two tables
My doubt when working with the layer DAO next: As far as I was informed, each table would refer to an object DAO. But suppose it is necessary to make an appointment with select / JOIN that is, that…
php mysql software-architecture pattern-designasked 9 years, 5 months ago Anderson Brunel Modolon 1,111 -
0
votes1
answer476
viewsSelect Format yyyyyy-MM-dd HH:mm:ss in MYSQL table column
Date 2014-12-01 10:52:38 2014-12-01 10:52:14 2014-12-01 10:51:57 2014-12-01 10:35:34 2014-12-01 10:23:17 2014-12-01 10:22:18 2014-12-01 09:03:49 2014-12-01 08:53:51 I have this column with these…
-
0
votes1
answer1057
viewsProblem saving result of an SQL query to a PHP variable
I have a SELECT to return the value of a table field funcionarionew, my idea is to save the result of SELECT into a variable and then insert the value of that variable into another table…
-
0
votes1
answer35
viewsCan you make a SELECT by returning the quantity and the name of each color?
I’m making these two queries to download the colors and the amount of each color in the table bike: SELECT DISTINCT color FROM bike ORDER BY color ASC SELECT COUNT(color) FROM bike GROUP BY color…
-
0
votes1
answer2904
viewsXAMPP - Apache error
I installed the XAMPP in my notebook, and it’s with this error that I don’t know what it is. 10:41:41 [mysql] Status change detected: stopped 10:41:41 [mysql] Error: MySQL shutdown unexpectedly.…
-
0
votes1
answer495
viewsReturn values from two columns of different tables
I have the STUDENTS table and the TEACHERS table, there are more teachers than students, I wanted to perform a consultation that brings students in one column and teachers in another and not all in…
-
0
votes2
answers132
viewsCondition (WHERE) with IF
I have two tables (posts and posts_promoted). Both relate and the search "normal" works smoothly. However, I need to do a search to return all posts and, if the post belongs to posts_promoted, bring…
mysqlasked 9 years, 10 months ago Danilo Miguel 332 -
0
votes2
answers184
views -
0
votes1
answer75
viewsProblem with generating txt via PHP
Dear, I have a routine that creates a txt file with some information of a query in mysql, but when the query returns some text with quotes, the problem begins. When displaying the data on the…
-
0
votes1
answer452
viewsSearch records from one date to another
The company has the base closure of "21 to 20" each month. Would you like to know how I make SQL only search for the records that are inside the lock? Ex: my closing this month is: 21/05 to 20/06,…
-
0
votes1
answer538
viewsSQL query normalize accents, til
I often have to search for names of products that have accents.. how to normalize this? In my table I use the collation utf8_general_ci, which serves well for upper and lower case (CI). Now,…
-
0
votes1
answer361
viewsImport CSV files to Mysql Workbench
I have a file .csv which contains in columns (vertically): Product.1 (line1) Product.2 (Linha2) But when I do this query: use test; LOAD DATA LOCAL INFILE 'local' INTO TABLE tabela1; Always give me…
-
0
votes1
answer9249
viewsImport . csv files to Mysql Workbench
I have a. csv file in column A: Product1 Product2 ... In column B I have: 1 2 ... if you want to put in the column The row 1 written Produ1 how do I proceed in the script? And what type of variable…
-
0
votes2
answers261
viewsPreparedstatement is not working
Code I’m using PreparedStatement i = conexao.prepareStatement("INSERT INTO teste VALUES (player='teste', level_1=0, level_2=0, level_3=0, level_4=0, level_5=0, level_6=0, level_7=0, level_8=0,…
-
0
votes1
answer892
viewsImport CSV files to Mysql using LOAD DATA LOCAL INFILE
I used the following script to import a file .csv to Mysql using the MySQL WorkBench: USE test; LOAD DATA LOCAL INFILE 'exemplo1.csv' INTO TABLE tabela1 fields terminated by ';' lines terminated by…
-
0
votes1
answer70
viewsWeekly Reservation
I’m developing a scheduling system and it’s almost all right but a question has arisen I need to create an option for weekly scheduling if the user clicked on weekly scheduling he scheduled all week…
-
0
votes2
answers5894
viewsFastest way to count how many records I have in a MYSQL table
As the title says I wanted to know the fastest way to count records from a table of thousands of records.
-
0
votes1
answer790
viewsinserting image in mysql database
If I want to insert an image in the database just use the following query: INSERT INTO teste (Id_Blob,Na_Imagem) VALUES (1,LOAD_FILE("C://imagem.png")); if I want to insert an image that be on…