Questions tagged as 'mysql'

1
answer

Insert multiple records into MySQL using NODEJS

How do I add multiple records at once in MySQL by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END addProduct(products: any): Observable<any> { ret...
asked by 04.12.2018 / 16:51
0
answers

Concatenation OR, AND, ORDER BY, and RAND () do not work

I have the following SQL : SELECT id,titulo,slug,endereco FROM empresas WHERE (categoria = ".$_GET['id']." OR categoria_2 = ".$_GET['id']." OR categoria_3 = ".$_GET['id'].") AND (status = '1') ORDER BY chave DESC, RAND() But it does not s...
asked by 04.12.2018 / 16:42
2
answers

Select Distinct is bringing duplicate data Mysql

Hello, I'm having problems with a query, and I need to bring only the last record of each id_face that has in the imagens table, but for some reason it's causing id_faces duplicates Follow my query: SELECT DISTINCT(...
asked by 04.12.2018 / 12:45
0
answers

difficulty accessing mysql

I'm trying to connect remotely to a mysql in google cloud, but I can not. in google I created a vm Ubuntu, last version, this is my ip, It'susuallydripping: Iconfiguredthefirewallasfollows: configureinoiptables: settbomy.cnf: Iranthecommandnamp...
asked by 04.12.2018 / 02:06
2
answers

Avoid duplicating with PDO in image upload

In that upload code. The class uploads an audio. Everything works fine, but, I do not know how to do that "identifies" and "id_user" can manage the upload and restrict to only when those two are different or is "empty", the upload is done. There...
asked by 03.12.2018 / 17:08
1
answer

Sort mysql search by function

I have a considerable problem: - I want to list a search for a function that counts. I want it to be displayed by the value of notifications Thenotificationcountismadefromthefollowingcode:functioncount_reports_where_id($conn,$id){//$cmd="SELECT...
asked by 07.12.2018 / 04:50
1
answer

Problem with identifying special characters in HTML

I have some problems with identifying special characters in the database. I do the UTF-8 decoding in the database: ALTER DATABASE biblioteca CHARACTER SET utf8 COLLATE utf8_unicode_ci; And also in HTML: <meta http-equiv="Content-Type"...
asked by 07.12.2018 / 00:14
1
answer

Doubt with foreign key

To register the games of a football league the following tables have been defined: Time ( id int primary key, nome char(20), pontos int, nroVitorias, golsMarcados int, golsSofridos int ) Jogo ( idTime1 int,...
asked by 30.11.2018 / 19:48
0
answers

Add data from a sale in the table (PHP)

People,Ineedurgenthelp.IhaveajobtodeliverMondayanditonlylacksthatpartofsalesrecord.Itworkslikethis:Ihaveastockcontrolsystemandsales,whereIregistertheproductsandmakethesales.TheotherpartsarereadythoughI'mbreakingheadonthatpartofrecordingthesales...
asked by 30.11.2018 / 21:45
0
answers

Doubt about eloquent with Laravel

Hey guys, I'm setting up a football club management system just to practice and in that a doubt arose, I have the following eloquent: $matches = DB::table('ut_tickets AS TIC') ->select('TIC.id', 'STA.name AS stadium', 'CLM.name AS club_...
asked by 18.12.2018 / 19:34