Questions tagged as 'mysql'

1
answer

Connect MySql that is hosted on another server

I have Centos installed with php + apache running This centos is local but I want to use this local server to connect to a mysql database that is on a server on the internet. I have firebird installed on this centos, and I can connect to i...
asked by 16.12.2014 / 17:24
1
answer

summation query

I'm having a kind of problem with this Query, but what I want to happen is for all values like: Goals Scored , Assists Made , Key passes etc, only once. SELECT s.[Statistics ID], s.[Player ID], s.[Game ID], s.[Season ID],...
asked by 19.01.2015 / 18:55
0
answers

Create checkbox and save to database

Good morning! I have a question, I am creating an application that when the user clicks to create a certain item in db, automatically creates several items in checkbox, I would like help to save these items in db as well. Follow the code crea...
asked by 04.01.2019 / 13:59
1
answer

Temporary table MySql

How to assign an update to a temporary table in my case I do an update at the beginning, create a temporary table and then a trigger in this trigger I try to assign the values changed by the update temporary table and soon in then I make a select...
asked by 02.04.2014 / 23:00
1
answer

Eloquent returning field and value

My select is returning the field and the value of the id that is in the table and I need to return only the value, how do I do it? $id = DB::table('participantes') ->select('id') ->orderBy('id','DESC') ->take(1...
asked by 25.10.2018 / 20:31
1
answer

Checking if there is a result in the query

Hello, I need to check if there is an answer for my query. If it exists, it should display an HTML code displaying the bank's data. Otherwise you must notify that there is no result. How do I make this selection? Example: $sql = "select * f...
asked by 10.10.2018 / 05:00
1
answer

Join two tables with PHP and retrieve the data in the same html select element

I am trying to list in the same element select of html the results of the query of different tables, but I am not getting. Here's the code below so someone can tell me where I'm wrong. <div class="form-group"> <label...
asked by 30.12.2018 / 15:27
0
answers

Using Join to save data in a MYSQL table [duplicate]

Hello, I would like to know if I have save data that I select from two tables and save to another through the join, because through a trigger it is not possible to do and until then I only used the join to perform views but I believe that give...
asked by 31.12.2018 / 02:16
1
answer

Return treated message when it occurs (com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException :)

Hello, good afternoon! Can someone help me to return a treated message when it occurs ** com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Can not delete or update parent row: a foreign key constraint fails ( loja...
asked by 08.09.2018 / 19:20
2
answers

How to choose the database in login

I'm developing a business management website, and for each company I'm going to make a separate database so there is no delay but queries and also that one company does not see the data of another company, the question is how do I make this sele...
asked by 09.09.2018 / 03:21