Questions tagged as 'mysql'

2
answers

SQL helps to join 2 selects

I have 2 selects below, how can I join in just 1 select? I need to get everything sold in a certain period (BETWEEN) per item only at the same time I have to get what I had from the item's stock up to the start date. To separate whether it...
asked by 01.08.2018 / 23:01
1
answer

retrieve mysql error message with php

Well, I know how to check the error code, but I do not know how to recover the error message. Here's my example: $conexao->query($query); $erro = "Errorcode: $conexao->errno"; I want to make the message appear, not the code. How do...
asked by 02.03.2017 / 21:02
1
answer

Linking of SQL tables by means of string instead of id

User accounts data id nome sobrenome pais estado cidade telefone url_perfil User login data id email senha prioridade My questions are: How can I bind them to foreign key using string ? Is it best...
asked by 24.02.2017 / 13:50
3
answers

Place a hyphen when the value is 0 in select

How can I do in% with a mysql (SELECT) so that when the value is equal to query , replace it with 0 . Value field: int.     
asked by 21.02.2017 / 17:50
1
answer

SELECT on self-relational table [closed]

I have a table funcionario , with attributes: ID (PK) and IDCHEFE (FK of the table itself). Each employee has a idchefe that references another employee (who is their boss). How to make a SELECT that retur...
asked by 18.12.2018 / 01:01
2
answers

Store all records in a table in a variable (PHP)

I need to query my MySQL database and store all rows that are returned within the $dadosBrutos variable. The purpose is for each line to be separated by the character "§", for example: nomeCliente1,telefoneCliente1§nomeCliente2,telefon...
asked by 27.12.2018 / 02:32
1
answer

How to disable date and time passed in jQuery UI calendar?

I would like to know how I can create a function that will disable the dates passed in jQuery UI. For example, now are 15/09/2014 07:31:25, how do I disable any date and time prior to this current time?     
asked by 15.09.2014 / 13:33
1
answer

Phonegap / Connection with MySql Remote without PHP

I would like to make a connection to a remote MySQL database through an application compiled for Phonegap without the need to use PHP. The bank would not be inside the device but the network on which the device is connected. Some websites say...
asked by 16.09.2014 / 18:34
2
answers

How can I show real-time database value?

I'm a beginner in php, let alone in js. I would like to get the count of how many users are registered in my database, however in real time using ajax. I have tried in many ways, but without success. for now I have only in code: $sql = "SELECT...
asked by 11.07.2018 / 23:06
1
answer

How to make ORDER BY with information that may vary?

I'm getting a list of articles from a database and I want to have on page one tool that allows me to list them by date order that were written or in alphabetical order. Here I have my bank reading function: $sel = DBRead('artigos', null ,'*...
asked by 03.09.2014 / 00:03