Questions tagged as 'mysql'

1
answer

Do SELECT with average user ratings

Well, I'm developing a project and it has the list of people, I would like to list them based on the average of the evaluation, I tried to do with INNER JOIN and AVG, but with them they will not show users who have just registered. The SELECT th...
asked by 08.11.2018 / 13:02
1
answer

Inner Join with like, Mysql, and Datatable

Personally, I have a problem at the time of searching a field in the datatable, I have a taxpayer table, this is linked to taxpayers_param, taxpayers_end and taxpayers_tel. I'm trying to do a search using like and inner join, until then the sear...
asked by 07.08.2018 / 17:48
1
answer

Pre-populating table with MySQL query

Does not bring what I want, can someone tell me what I'm missing looking at the code? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sistema de busca interna com PHP/MySQ...
asked by 17.08.2018 / 14:47
3
answers

Save auto_increment id of a table in another table in the same file

I want the ID automatically generated in auto_increment in the wpne_posts table to be saved to another table named wpne_postmeta The INSERT code for the first action is: mysqli_query($con, "SELECT * FROM wpne_posts"); $sql1 = "...
asked by 15.08.2018 / 20:23
2
answers

Field with # does not appear in Mysql by _GET

Good people, I do not know where to put the question .. Excuse me if you're in the wrong area! Well, I'm breaking my head with a code on my page. The code works it sends the data to my database, but it is not sending a piece of the field b...
asked by 15.08.2018 / 19:42
1
answer

How to return a value in a MySQL procedure

I have the following procedure: DELIMITER $$ CREATE PROCEDURE sp_CalculaVolume ( IN vReservatorioCodigo bigint, OUT Retorno decimal ) BEGIN Declare Formato int; Declare TipoReservatorio bigint; Declare retorno decimal;...
asked by 16.08.2018 / 15:35
2
answers

Help with an associative table of friends

I have a friends table, which has the following composition:    friends_id (relationship id)       id_user (id of the user who submitted the friend request)       id_user_to (id of the user who received the friend request)       id_status...
asked by 04.10.2018 / 19:53
1
answer

Extract column text from a table

I have the following table structure: Themetadatafieldisliketexttype,butIbelieveit'sactuallyaJSON.WhenIdo:SELECTmetadataFROMmaxpay.mp_pay_orders;Theresultis:{"idtransactions":122882,"transação":122882} I need to extract the idtransacti...
asked by 24.09.2018 / 12:52
1
answer

How to avoid double insert with different primary key mysql

My problem is critical in the system for some reason it inserts 2 times, I already tried to simulate the problem giving several clicks but did not duplicate. In my code in php I validate if the record exists before inserting but still happens. H...
asked by 18.07.2018 / 17:46
1
answer

How to make a condition with mysql number php

Hi I'm doing a virtual bank type in a part has to make the deposit, the user has the money in the portfolio for example. I have 500 reais in my wallet But if I put any value above 500 it will deposit in the bank account and I wanted the us...
asked by 23.07.2018 / 02:13