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
answer102
viewsIonic Framework - Web service or Mysql
An application with Ionic Framework, can access a mysql database equal to a conventional web application? example to Hostnet. Or is a web service necessary? And in the matter of security, which one…
-
0
votes0
answers430
viewsHow to insert Tags into a MYSQL database using PHP?
good afternoon! I have a knowledge base system where every user can go in there and fill out a form and register the procedure that they know. I am needing to implement a TAG field in this knowledge…
-
0
votes0
answers76
viewsMysql - What is the best input to be created in this case
Hello, I have a table in the database with the product price history. This table is very voluminous having more than 1 billion records. How can I create an index in this table, to meet the query…
-
0
votes0
answers68
viewsVery slow recording after adding Trigger in MYSQL Insertion
When I insert this Rigger into my database it is taking a slow time, getting to give this message: Errormessage: Lock Wait timeout exceeded; Try restarting transaction My Trigger is as below, the…
-
0
votes0
answers52
viewsProblem with cyclic relationship
I have a question: I have a user who submits documents which in turn are read by other users. Is there a problem in this cycle?…
-
0
votes1
answer45
viewsMysql syntax problem generated by Phpmyadmin
I have a problem when Myadmin generates a table creation script. The Script: CREATE TABLE `crud_ABC`.`cliente_ABC` ( `id` INT(10) NOT NULL AUTO_INCREMENT , `nome` VARCHAR(300) NOT NULL , `valor`…
-
0
votes2
answers309
viewsInclude numbers to complete numeric sequence in PHP
In this case I have the result in MYSQL. 01 03 06 09 I need to complete with the number correct sequence up to digit 12. Example: 01 02 03 04 05 06 07 08 09 10 11 12…
-
0
votes1
answer47
viewsProblem sending multiple emails
I got a problem, I made a script to send multiple emails, the problem is that it only sends to the first result of the select,and out of the loop without sending to the missing ones, below is the…
-
0
votes2
answers54
viewsSelect only if the ID is in 2 tables
I have 2 tables in Mysql, INSCRICAO1 and INSCRICAO2. Both have a field called COD that receives a user code. To INSCRICAO1 stores your personal information To INSCRICAO2 saves user’s car information…
-
0
votes0
answers32
viewsReturn a query by taking data from three tables
I need the result of three tables in a query to generate a google chart. table 1: // This will be the One column SELECT SUBSTRING(dt_vencimento,1,7) as anomes, SUM(vl_valor) as valor_total FROM…
-
0
votes1
answer47
viewsHelp with protection
Hello I am developing a simple thing comment system, I am using php with ajax, and storing in a Mysql database, my question is the following, entree $MENSAGEM = filter_var($text,…
-
0
votes2
answers1959
viewsMysql query excluding empty LINES
I have to make a query (which will be taken to a PHP application) in the table below. I would like to perform the query in such a way that no lines containing prices (that is to say null) are…
-
0
votes1
answer1443
viewsDelete record by comparing values between two tables
I have two tables: produtos - id_produto valores - id_produto id_produto would be a column, equal for the two tables. I need to delete the records from the table values, but only those that are NOT…
-
0
votes2
answers60
viewsTrigger with column check
I need to make a Rigger in mysql, but I need it to be executed only when there is an update in the auctions, which change the status to 3 or 4. The way I did below is correct? It is of the type…
-
0
votes2
answers109
viewsHow to bring SQL result grouped by year and within months
I have a table like this: data |id 2017-02-01 00:00:00|1 2017-02-01 00:00:00|5 2017-04-01 00:00:00|2 2018-02-01 00:00:00|3 2018-04-01 00:00:00|4 Then I make a query with PHP in Mysql that brings me…
-
0
votes1
answer687
viewsMYSQL extension error
I set up a code page on my site that looks for information from the database but in the file that connects to DB and pulls the pertinent information this giving a supposed extension error. This…
-
0
votes1
answer114
viewsCreate Trigger automatically
I created a code that creates a trigger automatically to Mysql. But my function still has flaws, one of which is that it is accepting the statements of PK's and FK's as if they were table fields.…
-
0
votes1
answer90
viewsInsert column with mysql function
Good morning, I’m a beginner and I’m having a hard time. I have a column called ID and it’s a history table, so this id repeats a few times I wanted a column that returned how many times this id…
-
0
votes1
answer91
viewsMysql transaction error in php
Good morning, forum guys. I’m trying to do the simultaneous Insert, then I’m using transaction control in php, only it doesn’t make the first Insert, so it generates me a Foreign key error. public…
-
0
votes0
answers428
viewsExtremely slow Mysql using LOAD DATA INFILE
I’m posting this question here, but I’ve already researched Google, Stackoverflow itself, I’ve tested changing several variables, disabling the Foreign Keys, Indexes and I don’t know how to import…
-
0
votes0
answers24
viewsMysql workbrench
Does not continue, for 99%. How do I continue the installation ?…
-
0
votes0
answers58
viewsSelect last conversations by counting unread messages in each conversation
I have done a chat in Nodejs and I can already bring the list of conversations. However, I also need to bring the amount of unread messages from each conversation. Currently this query brings the…
-
0
votes2
answers57
viewsSort VARCHAR database records with semicolon
How can I sort recorded database records as SWEEP. I tried unsuccessfully the code below. How can I format to get the expected order? SELECT *, CAST(representantes_vendas.valor AS INT) FROM…
-
0
votes0
answers39
viewsSee table by date
Guys, I have a table that the data is recorded as follows: ID CANAL VALOR DATA 25 10 50 2016-10-14 14:10:05 26 11 12 2016-10-14 14:10:06 27 10 51 2016-10-14 15:10:10 Both records are recorded…
-
0
votes0
answers58
viewsHow do I make two references of a table in other 2 tables?
Well, I have 3 tables tbl_users tbl_article tbl_profile I need tbl_usuarios to be related to tbl_articles and tbl_perfil. How could it be done? Table tbl_usuarios:…
-
0
votes1
answer198
viewsIF with syntax error
I’m trying to create a simple chat system using database but want to automatically when it reaches a limit of Rows in the database it automatically run the truncate. The Trigger code I made was…
-
0
votes1
answer115
viewsHow to communicate data from my database with chart (Highcharts)?
I am beginner in php, I am trying to supply my graphic with information from my bank.…
-
0
votes1
answer35
viewsDatabase query between tables
Database has 4 tables tabela 1 |escola|descricao| tabela 2 |matricula|nome|estado| tabela 3 |matricula|escola|posicao| tabela 4 |matricula|diretor|nome I need to do a state search (in table 2) and…
-
0
votes1
answer56
viewsStore stylized text on your BD for a news site
I am creating a news and articles site and this site will have a control panel where the Adm will do the CRUD of the news and articles they want to insert on the site. Well, I would like to know the…
-
0
votes1
answer106
viewsFormat mysql table date and show in Smarty
I am developing a PHP page, using MVC structure and rendering tamplete files with Smarty. However, it was difficult to get a date via Mysql (see format: YEAR-MONTH-DAY HOUR:MINUTE:SECOND I would…
-
0
votes3
answers536
viewsRetrieve from the database the "data-*value" attribute of a field through jquery
How to recover a field’s "date" attribute from the database via jquery. Today the system recovers the value(value) of the field, but now I also need to recover the date value of this field, as you…
-
0
votes0
answers32
viewsUncaught Exception 'Pdoexception' with message 'SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined
Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined' in D: htdocs sistemas imobiliaria admin classes imovel.php:603…
-
0
votes1
answer54
viewshow do I pull the result from a column inside a string in mysql
example : select case when campo = 1 then 'existe o resultado='aqui eu colocaria o nome da coluna da tabela 'fim da string' else 0 end from banco.tabela; how would it have a way of concatenating?…
-
0
votes1
answer38
viewsABOUT MYSQL AND FOREIGN KEY
Good night guys! I have a database with the tables: PASSENGERS MOTORISTS TRAVELS For each trip a driver is assigned. More than one passenger can go on the same trip. Doubt: How do I reference more…
mysqlasked 6 years, 7 months ago Lucas Jacks 1 -
0
votes1
answer625
viewsError comparing MD5 password in PHP
I’m having a problem in a login form, below follows the current codes. I’m using the method via POST, what happens is that it is not sending the post in MD5 to be compared in DB. In the database the…
-
0
votes1
answer94
viewsWhat is the best way to create an access report?
I am setting up a website recipes (PHP and Mysql) and would like to have in the backend a login report, where I can know what recipes each user sees more, to then suggest other recipes based on…
-
0
votes0
answers42
viewsVisits to the website
Hello friends I have this information of my visitors to make a very cool Dashboard, I am wanting to calculate the time of permanence of customers on the site, to each access that the person gives it…
-
0
votes1
answer698
viewsPhp formatting of numerics to save to mysql database as DECIMAL
I am implementing Ckeckout Cielo and it is always returned numerical values for prices. Monetary values are always treated as integer values, without representation of decimal places, and the last…
-
0
votes1
answer293
viewsCompare values using SQL
I find myself in the following picture situation I need to compare the value of the property with the minimum and maximum filter value but due to the semicolons I get no results. How can I solve…
-
0
votes1
answer146
viewsMysql trigger - Syntax error
Would anyone know where I’m going wrong Trigger down below? CREATE TRIGGER atualiza_produto AFTER INSERT ON item_venda FOR EACH ROW BEGIN UPDATE produto SET vendido = 's' WHERE id = NEW.id_produto;…
mysqlasked 6 years, 7 months ago Matheus Minguini 173 -
0
votes1
answer46
viewsDifference of Character and charset
I’m picking up a few things in SQL, and sometimes I come across CHARSET and CHARACTER For example: create database teste default character set utf8; And now, creating a table: create table teste (…
-
0
votes1
answer243
viewsPHP - Popular dropdown using a database table name
The title is already self-explanatory. I’ve tried everything, but I feel like everything I’ve done is completely wrong, haha. If anyone can help me, I need to dropdown where the values to be…
-
0
votes1
answer161
viewsMysql Trigger - Error syntax: DECLARE @sale INT' at line 3
I am doing a TRIGGER in Mysql so that at the time of an insertion in the table "Itens_venda" the field "sold" in the product table is changed to "yes". As a sale can have several items, I decided to…
mysqlasked 8 years, 1 month ago Matheus Minguini 173 -
0
votes1
answer362
viewssimultaneous access lock - Codeigniter
I need to block Simultaneos accesses with the same login on my system, currently using Codeigniter as framework. When logging into the system, I can set 'logged in' in the BD and the logout is…
-
0
votes1
answer99
viewsReplace Mysql with substring
I have information saved in a mysql field with the following format: STRING STRING STRING XXX Separating these strings there are 4 spaces. I would like to remove everything that is after these 4…
mysqlasked 6 years, 7 months ago Pedro Augusto 2,392 -
0
votes2
answers1350
viewsCreate database and table with PHP PDO Mysql
Good afternoon to all, I am inciante in programming and I am with a problem, I am creating a web registration system of stores, I created an administrative page to register the stores, in this I…
-
0
votes0
answers78
viewsDatetime Angularjs x Java x Mysql Persistence
I created an application in our company to control the use of certain equipment of our industry. The fact is that there was a need to control the date/time of entry and exit of a product in a…
-
0
votes2
answers847
viewsFormat phones in mysql table
I have a MYSQL table with the registration of people that phones are formatted this way. 519995150105 5133116284 51991178789 51999862438 What I need is a command to format the phones to look like…
-
0
votes1
answer40
viewsHow to take while from this example and display only 1 data?
How to take while from this example and display only 1 given? $query = $mysql->query("SELECT * FROM dados WHERE id='$id'"); while($row = $query->fetch_array()){ echo $row['nome']; }…
-
0
votes1
answer62
viewsExternal employee registration Validation mysql php
I want to register external employees in a mysql database using php. Each employee has to have in his possession an access credential where it appears: Company, Validity of credential, validity of…