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
votes0
answers176
viewsCommunication failure with Communications link Failure database
I have a database that is in the cloud, because it’s from a site that I and some colleagues are creating and I needed to connect it to Netbeans, I put the host, the name of the database, user and…
-
1
votes2
answers645
viewsMake calculations based on PHP or Mysql averages
A friend created a project in Arduino that monitors power consumption in Kw/h. It every 5 minutes inserts the consumption information in the Mysql database. Every five records I need to average…
-
1
votes2
answers419
viewsHibernate ORDER BY ASC|DESC does not work by passing parameter
Well, I’m having a problem ordering a query, where I’m passing the name of the field along with ASC or DESC as parameter for the query, however Hibernate is not finding itself, returning the query…
-
1
votes1
answer58
viewsHow to make a refresh more dynamic?
Is there a method of fetching data from a server by directly putting it to a page without having to use a basic javascript example: ?? setInterval(function() { $.ajax({ type: "POST", url:…
-
1
votes2
answers360
viewsReplace CRON
I made a script PHP which has to be executed at all times, usually from 1 to 1 seconds or at most 2 to 2 seconds. The problem is that I have configured several command lines in CRON to run every 1…
-
1
votes0
answers420
viewsIn return call function to execute a query in Mysql
I need to make an appointment in my comic when returning from a insert, but I’m not able to implement it. I have this in return: $.post( 'GravaFase.php', params, function( json, textStatus, jQxhr )…
-
1
votes0
answers153
viewsPHP and Mysql pagination
I created a search page with two search fields, it’s working and everything ok, only when I research I would like to page, and I’m doing something wrong. My code. <?php $conexao…
-
1
votes1
answer792
viewsHow to find a term in a mysql database?
How can I search all fields of all tables in a particular mysql database? I need to find a word that I have no idea where it is. The result would specify the name(s) (s) of the table(s) and the…
-
1
votes1
answer4041
viewsHow to select all tables containing the field with the same name?
I need to search all fields "id_category" in a given database, and bring a list of the tables that contain this field in common, which in this case is the foreign key of the table "sis_category".…
-
1
votes3
answers663
viewsKeep selected option dynamically loaded
I need to keep the option chosen in the combobox after the page is submitted, I have a function that does this, but only for Estaticas combobox, for dynamic combobox it does not work. I’m already…
-
1
votes2
answers138
viewsHow do I take a data on one page and put it on another?
I need to take a data sent by the user through the GET method on one page, put this data in the database and, on another page, I need to read this data from the database and write to the page. In…
-
1
votes1
answer1284
viewsMysql search with select option filter
I have a question. I have a php page with several select options to filter a search in the database. However, I cannot use the selected values in the query. I did as an example I saw on another…
-
1
votes1
answer1057
viewsDelete Directory Image - Laravel 5.1
I have in my method the following code: try{ Tecnico::find($id_tecnico)->delete(); DB::commit(); return Redirect::back()->with('message', true); }catch (\Exception $e){ DB::rollback(); return…
-
1
votes1
answer42
viewsRecords with close values
I need a light, I have to make an appointment to bring me registration with values close. I tried using SOUNDEX and even the phonetics function, but I did not succeed. Example: Let’s say the user is…
-
1
votes1
answer121
viewsI’m unable to update a field in Cakephp with $this->Model->saveField()
I’m unable to update a certain field in Cakephp. When the $this->OrdemServico->saveField(), he simply does not perform. Code: class OrdemServico extends AppModel { public $name =…
-
1
votes2
answers6151
viewsWhich Mysql command kills the process if a query takes more than 20s to execute?
People would like to know some configuration command in mysql, which kills the process if the query takes more than 30 seconds to return some result exists ? as ?
-
1
votes1
answer1085
viewsUPDATE with different conditions in the same query
How to update several records by setting different values, example: $update = "UPDATE tabela SET ativo=1, nivel=2 WHERE nome ='jose' AND nome='maria' AND nome='joao'"; then I just want Jose to…
-
1
votes1
answer1194
viewsCreate Mysql Trigger increment/decrement attribute
I have the following tables -> app(id_app, nome_app) -> category(id_category, nome_category, total_apps) -> app_category(id_app_fk, id_category_fk) What I want to do is this, that whenever…
-
1
votes1
answer165
viewsWeb Service for Android app
I have a question. Assuming I have a web service saving the data in Mysql, this service is responsible for feeding an Android app. The user accessing the app will sync the data to the device’s local…
-
1
votes3
answers447
viewsSearch for more than one value in the same column?
The table has the fields (id_exam, id_patient, data_exam, resultated) and has exams from 2010 to today. I would like to bring you the records of patients who had their exams in 2011, 2012 and 2015…
mysqlasked 8 years, 7 months ago Luciano Ferretti 23 -
1
votes1
answer52
viewsWhat is this code possibly doing?
index.xhtml : ui:repeat value="#{produtoService.listaProdutos}" var="prod" Note: I know I have to close the tags. But that is, what this code is doing ('assuming' that the tags are closed…
-
1
votes1
answer132
viewsUpdate mysql table with image
I am trying to upload an image but the table is not updated. already utilizei var_dump($arquivo) and the return is correct, with the file name + extension. the code is in the header of my page and…
-
1
votes1
answer75
viewsDelete From Database without deleting related objects
I have a system in which I register Instructors and Students, each Instructor can have several Students under supervision and each Student can have only one Instructor or no Instructor. My problem…
-
1
votes2
answers118
viewsSave form data without obligation to update image
I have a registration form and this form has a profile image of the registered user. The insert and update image are working perfectly. The problem is when I update any data other than the image,…
-
1
votes1
answer1100
viewsLoad and save PHP/ MYSQL image
This is a form that contains fields like CPF, RG... and a profile photo. I can add normally, but I can’t edit. If I change any data other than the photo, example: CPF, works perfectly. But if I want…
-
1
votes1
answer1940
viewsUpdate with select concatenated between two columns of the same mysql table
I am trying to run a query in which I will concatenate two columns of mysql name and surname, and update this concatenation to the full name variable in all table records. Follows the code: UPDATE…
mysqlasked 8 years, 7 months ago IvanFloripa 637 -
1
votes1
answer137
viewsInsert into a different model table in Cakephp 2.x
I’m making a website with budget cart, with the CakePHP 2.x. I created a statistical table, I made the model of it all right but I will do an insertion in it, only when I enter the detail of some…
-
1
votes3
answers328
viewsSQL - Query in a single table with null values
Hello, I need to make a date-filtered query. The problem is that non-existent dates in the table need to be returned by the query, having all other fields as Null. SELECT Data, Servico FROM…
-
1
votes1
answer196
viewsNodejs and Mysql problems
Hello I’m having problems with over-connecting with node-mysql2 using a connection pool. I would like to know if there is a better practice regarding implementation, and what is the best driver to…
-
1
votes1
answer189
viewsMy client record "almost" all fields
I’m having a very weird problem and I believe you can help me. I have a web system to control the company, where it has the customer registration, products and etc. The system is in php +…
-
1
votes1
answer52
viewsData cut in mysql
I am adding a small text in my database but the text is always cut, for example: Company X operates in private security with the aim of preventing and reducing property losses in a given…
-
1
votes0
answers51
viewsCustom search Fields and tags in Wordpress with slow results
I have a Wordpress site that holds custom Fields related to "Photo Albuns", I am now creating a search engine for such. The problem is that because he uses Tags in his albums and custom_fields in…
-
1
votes1
answer3043
viewsmysql error code 1111. invalid use of group Function
I tried using the following query in my database: SELECT MAX(COUNT(DISTINCT c.unique_carrier)) FROM companhia_aerea c, avioes4 a, ponte2 v WHERE c.unique_carrier = a.UniqueCarrier AND a.TailNumber =…
-
1
votes1
answer29
viewshow to return two distinct arrays using Union all
$stmt = $this->db->query(" SELECT COUNT(*) AS total, status as tipo FROM tabela1 WHERE status=1 GROUP BY SEXO UNION ALL SELECT COUNT(*) AS total, status as tipo FROM tabela2 WHERE status=1…
-
1
votes1
answer984
viewsOperations with Data Mysql
I would like to know how to make calculations with dates in Mysql. Table: ID | DataValidade (DATETIME) 1 | 2017-01-01 00:00:00 2 | 2017-05-01 00:00:00 3 | 2016-06-01 00:00:00 I need to return the…
-
1
votes3
answers1386
viewsUncaught Exception Pdoexception error with message 'SQLSTATE[HY000]: General error: 2014
I have a code that works perfectly on the local wampserver server, it is a query interspersing the result the problem is that when finishing the site and hosting it I get an error. The code is this:…
-
1
votes1
answer37
viewsShows how $query looks
Guys I’ve seen it working somewhere but I can’t remember where. And the next I want to give a echo in my code and display how was the Mysql type Insert $query1 = $conn->query("INSERT INTO dados1…
-
1
votes2
answers412
viewsHow to send the result of a query by e-mail SHELL SCRIPT
I have the following appointment: #!/bin/bash db="bats"; table="promotion"; dbHost="192.168.0.246"; dbUser="root"; dbPass="root"; result=`mysql -h $dbHost --user=$dbUser --password=$dbPass…
-
1
votes3
answers6114
viewsDisplay message after MYSQL query return empty
I have a script that makes a query in the database and displays the result... I would like when the query returns empty, a message is displayed to the user. The code: <?php //variavel dinamica…
-
1
votes0
answers227
viewsMaking Mysql UPDATE in DB database according to Mysql SELECT in DB2 database
I need to update a field (office) of a table (investor) of the database (B2c) on my website. However, this UPDATE will depend on a SELECT query that is made in another database of another site (both…
-
1
votes2
answers12794
viewsHow to create a Mysql database with SQL commands?
I would like to know how to create a database in Mysql using SQL commands, which I can run in Mysql Workbench, phpMyAdmin or any other software. What SQL commands are needed to create a database and…
-
1
votes1
answer168
viewsHow to know the contents of a foreign key for filling another table?
I will give as an example 2 tables of a database: User and Address. where the user has the idEndereco attribute as a foreign key to the address table. The ids are with AUTO INCREMENT, yet, how do I…
-
1
votes0
answers23
viewsHow to fire emails with a date marked in php?
I have to create a PHP system to fire emails to customers on certain days of the month or on numbered days. How can I do that? Any suggestions ??
-
1
votes2
answers54
viewsError while running a Trigger
I have a problem in a Rigger that when I do an input of a record I want to automatically pass a value that comes by default is 1 to 0 only it is always giving this error. Can’t update table…
-
1
votes3
answers552
viewsText registration with emoticons
I have a page where a textarea allows the user to paste news. the content inserted there is saved in a MYSQL database to be displayed on the site page in the future. I need that, if the user paste…
-
1
votes1
answer51
viewsBring Existing and Non-existent Records
I got the next thing: $consulta = Dealer::find(1); No Model # Serviços public function dealer_servicos(){ return $this->hasMany('App\DealerService', 'id_concessionaria'); } So if I do:…
-
1
votes2
answers1887
viewsproperty registration php mysql
Good morning, I’m doing a system of promising and would like to know how to register the plots in the comics with the information. I would like to insert the information as follows: in the…
-
1
votes2
answers1299
viewsCodeigniter with Modal Screen and Registration Response
I am making a registration of call requests through a modal but I can not handle the registration answer: "Register with Success" Controlling class <?php defined('BASEPATH') OR exit('No direct…
-
1
votes2
answers202
viewsHow to Exchange Arrays query for Selects query in Mysql
I’m not sure how to exchange arrays for query in sql, in this code below you have an array with records like to know how to exchange the array $tabela_modelo by a select in Mysql using the same…
-
1
votes1
answer43
viewsData return problems when creating a php search
I’m creating a search.php for my sisteminha, so far everything is OK, but no while that I created to show the questions that match the searched title and their respective links, nothing appears on…