Posts by Danilo Miguel • 332 points
27 posts
-
-1
votes2
answers377
viewsQ: Fetch stock balance on a given day (or day)
I have the table "saldo_dia" where I record the product (ID), the date and the balance. I need to generate a report (Kardex) and fetch the balance of a given day as "starting balance". My question…
-
0
votes0
answers161
viewsQ: Curl does not work on a given server
I am with the following situation: has a code makes a post to a remote API sending a file (image). Works on the local server (localhost | Wampserver | PHP Version 5.5.12) Works on the Digital Ocean…
phpasked Danilo Miguel 332 -
-1
votes2
answers874
viewsA: Apache: prevent SSL forwarding of a specific URL
I solved the problem as follows: I removed the redirect from the default-ssl.conf (Apache) Because it’s a Cakephp system, I edited . htaccess into /app/webroot and inserted the redirect there,…
-
2
votes2
answers874
viewsQ: Apache: prevent SSL forwarding of a specific URL
My server (Apache 2x) is working correctly with SSL certificate but need to prevent that only a single URL accept normal connection (HTTP only). The current structure is like this (it is messy due…
-
4
votes3
answers2377
viewsQ: Structure table day and times (schedule type)
I need to create a table that contains days and hours of operation of an establishment, a kind of agenda. This table should represent every day of the week and on each day contain the opening and…
-
4
votes2
answers662
viewsQ: Add content at cursor position with Ckeditor 4.5
I have a textarea where certain text will be typed. This text may contain some specific fields (variable type, which will be replaced later). I need to know how to insert these "variables" in the…
-
0
votes1
answer127
viewsQ: Mysql Relationships: Query Problem
I have the following scenario I need to get all the consulta_tipos with consulta_itens aligned and mark those that are in cliente_consulta_tipo and cliente_consulta_itens, also need to seek the…
-
0
votes1
answer440
viewsQ: Angularjs: Change scope in ngRepeat
I have the situation: in the table below, when I click on "edit", displays the form with the required fields (including with a new "cancel" button). So far everything is working well. The problem is…
-
0
votes0
answers37
viewsQ: Mysql: Find errors using WHERE IN
I have the following situation with the tables below. I need to do some checking in "serials" (if the serial exists, if it is valid, etc, and other validations next to other tables) from several…
-
1
votes0
answers345
viewsQ: Mysql: Insert with conditional
I need to realize the following situation below, but when executing I have the error: /* SQL Error (1064): You have an error in your SQL syntax; check the manual that Corresponds to your Mysql…
mysqlasked Danilo Miguel 332 -
0
votes1
answer132
viewsA: Cakephp 2.X : External SESSION
I don’t see the need to use Cakephp resources for this, I don’t really know if you have any native resources for this. What I advise is to use pure PHP in this case, ie working with the global…
-
0
votes1
answer35
viewsQ: Phonegap: problems when creating android buil
I’m starting work on Phonegap and I haven’t been able to build my project. I get the following errors (as shown below): My SDK has the following installed packages: I have tried several options, but…
-
1
votes3
answers596
viewsA: How to select last related table records?
The way I (finally) solved the problem was as follows: SELECT Negociacao.id,Cliente.nome,NegociacaoStatus.nome,NegociacaoContato.created,DATEDIFF(NOW(),NegociacaoContato.created) AS dias FROM…
mysqlanswered Danilo Miguel 332 -
1
votes1
answer180
viewsQ: Searching for names inside a text
I have a string where I need to search by name. The text has no pattern. The name list is an array. So far I have managed to do normally, but I have come across a situation where a given name had a…
-
0
votes1
answer130
viewsQ: Multiple terms in regular expression
I need to search a few specific words in a text. I’m using ER for this. However, as I need to look for more than one word, in some cases the result is unsatisfactory. Below the ER I am trying to use…
regexasked Danilo Miguel 332 -
5
votes3
answers596
viewsQ: How to select last related table records?
I have the following tables: negociacoes, negociacao_contatos and negociacao_status and the following relationships: negociacoes hasMany negociacao_contatos negociacoes belongsTo negociacao_status…
mysqlasked Danilo Miguel 332 -
1
votes2
answers292
viewsQ: Cakephp: Paging with manual query
The The Cakephp Manual suggests a change in default pagination for custom queries cases and in some cases my project has worked perfectly. But I have a situation where I have several custom queries…
-
2
votes2
answers794
viewsQ: CSS: Character inside a round element
I need to create an element (span, possibly) that will contain a character (initial letter of name) and that element needs to have rounded corners. I managed to do it in a precarious way, because…
-
8
votes3
answers1685
viewsQ: How to handle large volumes of data in a database?
I have a process that I need to implement on my system that, at a given time, will check a relatively large number of data and, if not found, should save in the Mysql database. This should be…
-
0
votes2
answers85
viewsA: how to print <td> tags in php
Why do you have an echo '$html'? From what I understand you are trying to concatenate some content in the $html variable, which should already have something. So, the correct one would be: $html =…
phpanswered Danilo Miguel 332 -
0
votes2
answers261
viewsA: Affix on a dynamic sidebar
You can set the div containing the . budget-Summary with the full page height and put an overflow=auto on it. Thus, when filling all available space at "height", a scroll bar will be displayed only…
-
1
votes0
answers183
viewsQ: Angularjs: Questions with complex template
I need to create a page where the template should vary as requested. For example, on the home page I have a space for contents in tabs and a fixed column (as shown below). Both tabs and column are…
-
0
votes3
answers137
viewsQ: Problems with WHERE IN (many records)
I need to assemble a query to search for records in table A, with table B record filter. Something like: SELECT * FROM tabelaA tblA WHERE tblA.coluna IN (1,2,3,...) The values contained in the "IN"…
-
0
votes2
answers132
viewsQ: Condition (WHERE) with IF
I have two tables (posts and posts_promoted). Both relate and the search "normal" works smoothly. However, I need to do a search to return all posts and, if the post belongs to posts_promoted, bring…
mysqlasked Danilo Miguel 332 -
1
votes1
answer87
viewsQ: Format result with concatenated field
I need to bring from my database a TIMEDIFF with field formatted like this: 12:50 (hours and minutes). I use the following excerpt:…
-
1
votes2
answers571
viewsA: Error generating PDF in Cakephp through FPDF
Is it possible to migrate to Htmltopdf? If so, migrate. I also had several problems with FPDF that I could only solve with migration. In addition, open the Chrome development tools (CTRL+J) and in…
-
2
votes0
answers92
viewsQ: Error creating and downloading XLS with Cakephp
I have the following code: $this->autoRender = false; $this->autoLayout = false; $turmaId = base64_decode($turmaId); $turma = $this->Turma->find('first',array( 'conditions'=>array(…