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
-
1
votes1
answer715
viewsHow do I search for JSON object property values in PHP/Mysql?
I need to filter the tags, they’re separated by comma: { "tags":"Tag 1, Tag 2, Tag 3" } Using $busca = 'Tag 1'; $sele2 = $pdo->prepare("SELECT * FROM quiz_publico WHERE quiz_json like…
-
1
votes0
answers88
viewsLink n to n
I have a database and I wanted to dial n to n on C#, but I don’t know how to get the data from my other table. I wish where it says id_equipa the data of the team selected in the combobox Step to…
-
1
votes0
answers14
viewsHow to update multiple lines in mysql?
I have a table (respostas) MYSQL thus: ID|resposta 1 | A 2 | B 3 | B 4 | C Then when sending the form below it should update the response column according to the value of each input: <form…
-
1
votes1
answer45
viewsUPTADE with JSON and Php
I’m trying to do an uptade with json and php, however, is giving error and do not know what is the problem. If someone can help me I appreciate. function uptade_cat() { var valor=$("#valor").val();…
-
1
votes2
answers50
viewsTable position
hello, I’d like to know how I can number the table by numbers, example, each would have their indicator as I’m making 1 top 100 players and wanted to number each with the position number public…
-
1
votes1
answer50
viewsEntity Framework, code First, Database query
Good evening, I have two classes to which one is an attribute of the other, Customer has Anamnese , when I search the database the return is the right customer, but the field Anamnese is null, and I…
-
1
votes2
answers47
viewsMysql Query with Infinite Loop in C#
I’m doing a project with creating dynamic objects with CSS, after he enters the for, he inserts all the data of the database right, but apparently at the end he makes an infinite loop and appears…
-
1
votes1
answer133
viewsRegex - How to recover the first occurrence of two uppercase letters after a comma in Mysql?
I have the following text:: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sodales porta tempor. Praesent eleifend volutpat nulla, BA at aliquet libero. Vivamus est eros, convallis…
-
1
votes1
answer41
viewsSearch only one record type in the database and show in Datagrid
How do you do a bank search and show on DataGrid, only that I select a category I’m not sure how to do this kind of search in the bank, when I select in the ComboBox1 the active word, it brings me…
-
1
votes1
answer169
viewsHow to make multiple database connections with Laravel 4.2
I have an app written on Laravel Framework 4.2, rotating in the PHP 5.6, in the Operating System Windows 7, connected to a mysql database, there was the need to make additional connection in another…
-
1
votes1
answer190
viewsUse DISTINCT and SUM in the same Query
Good I have the following query: SELECT SUM(a.valor - a.desconto - a.credito + a.frete) FROM pedidos a, cadastro b WHERE a.status = '2' AND a.data >= '2019-03-29' AND a.data <= '2019-04-29'…
mysqlasked 5 years, 7 months ago Hugo Borges 5,294 -
1
votes0
answers44
viewsMulti-table Data Sum Problem using PHP and MYSQL
Guys, I developed a call system, and now I need to do the report of students with the amount of absences and attendance. I use 1 table(chamadas) to register some information of the call and when you…
-
1
votes1
answer71
viewsError connecting to database (mysql) using entityFramework
When trying to connect in the database I get this message: The underlying Provider failed on Connectionstring. <entityFramework> <defaultConnectionFactory…
-
1
votes0
answers29
viewsUnable to change field in php when id is not 1
Good evening, I’m trying to make a change to my database through php, but when clicking on "change" it only allows if the code is equal to 1, I have already put in html to send the id as soon as we…
-
1
votes1
answer139
viewsPHP/FTP File Verification
Hello, I have the following situation: My company wants to validate all files from a particular folder on FTP with BD (Mysql), to make sure that all files are being used and those that are not…
-
1
votes1
answer89
viewsTake data from a table through an N:N relation
I have a system made in PHP and Mysql where I have two types of registration, teacher and student. On this platform, the teacher can add a student as "friend" and the student can also add a teacher…
-
1
votes1
answer65
viewsSELECT CASE WHEN DATEDIFF considering hours, minutes and seconds
I created the query so that when a plan expires, the output 'Date' will print 'Expired' and if it has not yet expired, print 'Current', but I need to take into account also the time(s), minute(s)…
-
1
votes1
answer156
viewsBD creation with Mysql - Mariadb - Workbench
I’m trying to create a BD as Diagram done in Workbench but returns the error below: ERROR 1064 (42000) at line 45: You have an error in your SQL syntax; check the manual that corresponds to your…
-
1
votes1
answer150
viewsMysql - Error performing INSERT with FOREIGN KEY
Hello, when performing an insert in the database Mysql returns the following error: ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`tb_hosts`,…
-
1
votes1
answer104
viewsMysql - Duplicate SELECT?
Can anyone tell me why you’re doubling the SELECT? CREATE TABLE tb_grupos( id_tbl_grupos int(3) NOT NULL AUTO_INCREMENT PRIMARY KEY, id_grupo int(50) NOT NULL, hostname_grupo varchar(50) NOT NULL);…
mysqlasked 5 years, 6 months ago Luis Henrique 697 -
1
votes0
answers64
viewsSave scratched image inside the server and send the image name to Mysql
I’m using this code to draw on the screen https://github.com/szimek/signature_pad How to save the image inside the server and send the image name to Mysql? Example directory:…
-
1
votes2
answers49
viewsMultiple delimiters in PHP gives error, Phpmyadmin does not
I created a QUERY with multiple delimiters to run only once and perform UPDATE in different tables, but gives syntax error when run in PHP, but in Phpmyadmin works normally. I already checked the…
-
1
votes0
answers45
viewsHow to make relationship using the result of a relationship with Eloquent
I’m having trouble making the relationship between the table produtos, opções and tipos de opções on Laravel, I can bring the products and their options using Product::with('options')->get(), but…
-
1
votes1
answer46
viewsUsing select the same select more than once
I need to wear the same select other times, but I’m not getting it. It shows the result in the first while, but for the rest not. On the same screen I will repeat by 4x, because I am referring to…
-
1
votes1
answer34
viewsMysql - CASE WHEN, the third condition does not return the THEN
I made the QUERY a CASE to display in 'Data' output if current, expired or pending, but for pending has no output when printa. $sql_check_plano = "SELECT *, ( SELECT `ps_nome` FROM `plano_pack`…
-
1
votes0
answers29
viewsHow to fix error num_rows Property
Folks I have a question regarding this error: Notice: Trying to get Property 'num_rows' of non-object in C: xampp htdocs control inc database.php on line 94. Follows part of the code. function find(…
-
1
votes2
answers108
viewsMark only one radiobutton for each line
I have a list, where by line I will mark the radio button stating: HAS, DOES NOT, BROKEN. How do I do and what is the correct way to send this to BD Mysql for later on the edit screen capture?…
-
1
votes1
answer68
viewsPython - value saved to database is reset
I’m doing a job for college using an Arduino and a Raspberry to make a self-contained vegetable garden. The sensors of temperature and humidity, luminosity and the hygrometer are connected to the…
-
1
votes0
answers308
viewsAvoid SQL Injection - with PHP and Mysql
When I try to log in to the administration page of the site with ' OR 1=1 -- in the login and password it allows access! I’m trying to use the next function, but I still have access without…
-
1
votes1
answer42
viewsStoring the value of a SELECT Query in a column in MYSQL
I have this SELECT in my BD however I need one of the columns to store the value generated by lucro, I already have a profit column created as DOUBLE but it does not store that information SELECT…
mysqlasked 5 years, 6 months ago Pietro Nunciaroni 157 -
1
votes1
answer32
views -
1
votes0
answers108
viewsPdo login authentication
I have a problem that always falls independently in the error line Incorrect Password, this script was in mysqli and I am trying to pass to PDO. What could be wrong? <?php session_start();…
-
1
votes1
answer443
viewsHow to separate the results of a SELECT in MYSQL into 2 foreach in PHP?
I have a recipes website where I bring the list of recipes according to the query below: SELECT * FROM receitas WHERE titulo LIKE '%batata%' ORDER BY ordem I wanted to show the first 3 featured…
-
1
votes2
answers69
viewsQuery with more than one view field
I have doubts about how to perform the query displaying two fields, with only one. I have the Clients Table (id, name, date of birth) and the Transactions table (id_trans, id_clien, valor_trans). I…
-
1
votes3
answers221
viewsMysql LIKE cannot be found by full name
I have a search system in Mysql + PHP, it does the search like this: $nome = "Treinamento Da Venda à Entrega (Teste)"; $sqlPost = "SELECT id FROM tabela WHERE nome LIKE '%$nome%'"; $resultPost =…
-
1
votes1
answer260
viewsHigh charts in php and mysql
I am trying to create dynamic highchart charts in php and mysql. I started by creating the database queries: $query = "SELECT Descricao, COUNT(Descricao) AS Tarefa FROM raddb.Tarefa AS A LEFT OUTER…
-
1
votes2
answers44
viewsHave more than one line in the same query
I cannot return the database data when I try to search for more products related to different categories. I am using the following query; SELECT * FROM `app_product` WHERE app_category = 6 AND…
-
1
votes1
answer45
views -
1
votes1
answer51
viewsIndex Fulltext is not filtering in select Where
I have a table called boletos, and created a FULLTEXT index for the column categoria, which is the column that will go the most in the search for the Where. I did everything right, only when it’s…
-
1
votes3
answers216
viewsHow to take the value of a Database table field and use it in a PHP variable?
I have the following question: I have a condition if else in php the problem is that I need a value inserted into a field in the database table for the script fulfil the condition of if or of else.…
-
1
votes1
answer69
viewsIs it possible to optimize my code for a single query?
I have the following problem: I’m assembling a Highcharts chart with queries php and I end up having a while inside another because the result of the date I put in the next query, has to return in a…
-
1
votes0
answers72
viewsInserting data into two tables in a single form
Hello, good morning, good morning! I am studying Webform in college, and I have a question to enter a value of a single form page for two Tables. In case to exemplify, I have two tables "Person" and…
-
1
votes2
answers268
viewsPass controller data to EJS
I need to pass the obtained data, by a query in the database, to my EJS template in order to manipulate these values. My current code is like this router.get('/devreport', redirectLogin, (req, res)…
-
1
votes1
answer142
viewsIn Mysql group by week does not list correctly
I have in Mysql the table acesso, that saves all client accesses to a system, it saves user id (id_usuario) and the day (dia) access. I am making a query to check the weekly accesses, so: SELECT…
mysqlasked 5 years, 5 months ago caiocafardo 1,897 -
1
votes1
answer83
viewsHow do I convert data from a multi-line Mysql Text field to line-breaking HTML?
I have a Text field called INFORMATION in my Mysql table containing data in multiple rows: Joseph, Maria, Melissa, When I convert to HTML the result appears in a single line: Jose, Maria, Melissa, I…
-
1
votes1
answer46
viewsQuery to remove duplicates entering apparent infinite loop
I have several fields in my table but I have 4 that are being repeated and I cannot allow registration with these equal fields: COD, TIPO_ATIVIDADE, DT_VENCIMENTO, `EXTRA_URGENTE_COMUM. I have tried…
-
1
votes1
answer149
viewsHow to configure mysqli TIMEOUT in PHP?
I have some servers I have to test if I have a connection. Some of these servers have blocked access to my machine for testing, so they’ll give the message Can't connect to MySQL server on. However,…
-
1
votes0
answers65
viewsImport excel table directly into mysql
I’m using the following code to try to import 30,000 csv records into a comic mysql on the hostgator server load data local infile 'public_html/empresa.csv' into table empresa fields terminated by…
-
1
votes0
answers60
viewsQuery return problems [Qt Mysql]
Considering the following table: ID : int Quantidade : smallint PrecoUnitario : float(5,2) I tested the following Query in Mysql Workbench: SELECT ID, SUM(Quantity * Precounitario) FROM test GROUP…
-
1
votes0
answers66
viewsLeft John of Phpactiverecord using Codeigniter does not work
I’m using Phpactiverecord’s left Join to get data from companies and users, but it’s not working. I use the users and Companies tables as relationship table proposals. I want to get the user data in…