Questions tagged as 'mysql'

1
answer

Prevent duplicate records in left outer join

I have tried to use distinct but without success ... result should be SELECT distinct prd.ID_CPF_EMPRESA, prd.prd_codigo , prd.cat_codigo , prd.prd_descricao, prd.prd_preco , prd.prd_img , prd.prd_det_1 , prd.prd_det_2 , prd.prd_ativo , IFNULL...
asked by 31.10.2017 / 19:26
1
answer

Select with averages in minutes - Mysql

Below is a query returned in a table from my database (MySQL): WhatinterestsmearetheTimeString,VarValue,andidcolumns.Every5secondsonaverageaninsertismadetomysystem.IhaveDateTimevaluesof1month.Doubt:HowdoIsetupqueriesthatreturnmeatintervalsof...
asked by 01.11.2017 / 12:25
0
answers

About integrity in bd mysql

If I set the foreign keys and cascade activation on bd as per the use of delete and update events, do I need to do this at the application level as well?     
asked by 29.10.2017 / 14:15
2
answers

how to save date with Date type in MYSQL and return to an Android app

Hello, I have an Android application that takes the date from a DatePicker but I am not able to convert it to the type accepted by MYSQL in the Date case how could I do this?     
asked by 13.11.2017 / 10:56
1
answer

How do I display the table data (HTML) of a database through JSON Express?

Hello! I would like to know a way to present to the user in an HTML table, data stored in a MYSQL database with connection through JSON Express. const express = require('express'); const app = express(); const bodyParser = require('bo...
asked by 03.11.2017 / 06:07
2
answers

Order By in 2 tables MYSQL

Good morning! I'm having a hard time and I'd like your help with this problem! Now, I'm doing a select in MYSQL where multiple tables are selected, in opencart to generate an XML for facebook ads. My XML is like this SELECT DISTINCT t1.p...
asked by 03.11.2017 / 12:29
1
answer

Difficulties with PHP - lastInsertId () [duplicate]

I'm having trouble getting the last id inserted in my table using the php function PDO lastInsertId() How do I get the last id inserted in my table using my structure?    Connection to the bank class ConnectionDB{ private functio...
asked by 10.11.2017 / 00:59
1
answer

Problem with SQL (duplicate addition)

I have a bidding system that works with a robotic giving automatic bids, and also with a button where the customer can bid. When the client clicks the button, it calls a function that executes the following query: $qryins = "Insert into bid...
asked by 23.10.2017 / 21:01
3
answers

No select error using mysqli_query

I've done a php to list the rooms, but I'm having difficulty listing them, if anyone can help me, I would appreciate it. <?php $link = mysqli_connect("localhost","root","","hotel"); $result = mysqli_query("SELECT descricao FROM quartos WHER...
asked by 08.06.2015 / 21:53
0
answers

Login through a subdomain

I have a problem to solve. I have a social network, and I have a chat from the chat boom, the social network is wowonder. I am integrating the login system of the social network into the chat boom, but when I try to login, through the boom ch...
asked by 23.10.2017 / 14:39