Questions tagged as 'php'

1
answer

Complex bank type extract MySql how to solve

I have a VIEW table that I need to extract an extract from it, I've already been able to help with stackoverflow here for an extract. The problem is that now I need to filter this extract a little more, separating it for a given ID, but when...
asked by 10.09.2015 / 06:00
1
answer

Problem with accent when generating PDF with dompdf

I am generating a PDF report using the dompdf API, and words that contain accent are not being displayed correctly. I put the charset = 'utf-8' tag inside the head, but it does not solve the problem <meta charset='utf-8'/> In php...
asked by 11.09.2015 / 01:06
2
answers

Inner join 3 tables

I have the following query. $cmd = "SELECT ofertas.id, ofertas.titulo, ofertas.descricao, ofertas.valor, ofertas.user_of, ofertas.categ, ofertas.local, ofertas.fav, favoritos.id_oferta FROM ofertas INNER JOIN favoritos ON ofertas.id=favorito...
asked by 04.09.2015 / 15:59
1
answer

Is it a good idea to use interfaces to specify which magic methods a class will implement?

I've seen some PHP code that, to check if a class has the __toString method, the method_exists function is used. Example: if (method_exists($object, '__toString')) echo $object; On the other hand, I have seen interfaces tha...
asked by 10.09.2015 / 17:42
1
answer

Hiding URL address in href

I would like to know how I can cover up the original address of a url following the example of this url that follows the url I use http://thumb.servidor.direto.com.br/15574899.mp4 to stay this way in the href="#">#
asked by 18.08.2015 / 20:16
1
answer

Implement a CRUD class

I have a CRUD class that has the following methods: GetConnection () Insert ($ object) Update ($ object) Delete ($ object) Select (object) Taking into account the SRP (Principle of Single Responsibility) that says:...
asked by 23.08.2015 / 18:08
1
answer

Laravel Session - Public for Controller

I'm making a form that contains a Captcha . Captcha is generated by a PHP script that mounts an image. And I put the script in the public folder of Laravel 4 . When the Captcha code is generated it is placed in session: session_s...
asked by 26.08.2015 / 14:45
1
answer

How to check time entry and void calculation when it comes blank

I'm calculating the difference between two times using
asked by 18.08.2015 / 22:22
1
answer

In PHP, is there any way to import only one function from a given file?

I see that in Python, we can import only one function from a given module, without having to load it all. In addition, this is great for avoiding role name conflicts. Example: #funcs.py def x(x): return 'x' def y(y): return 'y'...
asked by 07.07.2015 / 19:03
2
answers

Contact form 7 in custom post

I have contact forms made with the contact form 7 plugin inside my site, but the contact forms only work on pages, inside posts do not work. On the contacts page it sends correctly and shows the sent message: Thesingleoftheportfoliosendst...
asked by 30.03.2016 / 00:34