Questions tagged as 'mysql'

1
answer

Communication between database and app in Python - mini system to get password

Hello, I'm learning python and I decided to do a mini project, a simple system of chips, while I thought about it I came across some doubts and could not find almost anything about it. The program would work as follows, the person takes a fil...
asked by 09.07.2015 / 21:26
1
answer

Doubts Distinct with Doctrine_Query

I have a table in mysql and I need to return unique values from this table, but I am not able to create a function or query that suits. The SQL statement in the database would be like this and it works fine, but in Doctrine I can not do: SELEC...
asked by 18.09.2015 / 16:48
1
answer

Write to two or more MySQL tables

Doing this with two or more separate inserts in the same function is simple, but is there any more correct way to consume the least amount of resources? In the platform that we are working on, all user actions will be saved in other tables and l...
asked by 17.09.2015 / 18:57
1
answer

show table data between two dates chosen (dates are in varchar)

SELECT * FROM minhaTabela WHERE status=2 AND nomePessoa='Jose Silva' AND STR_TO_DATE(data_enviado, '%d/%m/%Y') BETWEEN STR_TO_DATE('01/05/2015', '%d/%m/%Y') AND STR_TO_DATE('31/06/2015', '%d/%m/%Y') is there any way to do an if / else? I have...
asked by 30.06.2015 / 23:10
2
answers

Error inserting record, last possible index value already used

I'm having an error trying to insert a record someone knows how to solve. Here is the error message: Operation failed: There was an error while applying the SQL script to the database. Executing: INSERT INTO 'local'.'tab_evento' ('id') VALU...
asked by 03.07.2015 / 20:26
0
answers

Super Trunfo - PHP

I'm making (or trying) a super trump card. I do not have programming knowledge, let alone in .PHP! What I did so far was through surveys and videos! I ended up learning the basics and what really matters to me. I will paste the code: <ht...
asked by 07.08.2015 / 01:33
1
answer

Syntax error in MySQL procedure

I am trying to create a Procedure in MySQL and it is returning Syntax error. Here is my code for review: DELIMITER $$ CREATE PROCEDURE CalculaIdadeCP (IN cpcaminhaoid INT) BEGIN DECLARE DataEnsaio,DataMoldagem DATETIME; /*CORPO DO PROCEDIM...
asked by 08.07.2015 / 16:28
0
answers

Optimize SQL code

I would like to know if a way I can optimize this sql (mysql) code I did, the search is very slow, taking too long to bring the selected fields, I've already done some testing but it's still the same. > SELECT rc470.cod_item as 'Código do Prod...
asked by 08.06.2015 / 22:55
5
answers

CodeIgniter - Message: Trying to get property of non-object

I'm trying to solve this error:    Severity: Notice   Message: Trying to get property of non-object   Filename: contracts / visual.php   Line Number: 37 CODE: contract_model.php public function getById($id){ $this->db-&...
asked by 08.06.2015 / 21:48
2
answers

Data formatting error

Well it's as follows. I'm going to get certain texts from the database, then I'll list them in the web, and when I do, the accents are all square and so on. But when I write in the code with accents and such, everything is normal. And I'm usi...
asked by 09.06.2015 / 01:34