Questions tagged as 'php'

2
answers

How to receive data via POST, sent from android to webservice PHP?

I've done a webservice in java, now I'm switching to PHP and I'm having trouble implementing a page that receives via POST a JSON that the Android app sends. ANDROID public static String POST(Context context, String endereco, String jso...
asked by 22.01.2015 / 18:17
1
answer

I can not persist the data in the Bank

I think I'm doing something wrong in this class because it's the only one on my system that is not persisting in the database. What am I forgetting to make it work? The incluir() method? If I run a var_dump($log) , before calling...
asked by 03.02.2015 / 22:08
2
answers

Search with MySQL PDO in Array

I have this code: $whereBusca = "itaim-bibi"; $whereBusca = explode(',', $whereBusca); $sql = $pdo->prepare('SELECT id, nome, caminho FROM regiao WHERE caminho IN (:whereBusca)'); $sql->execute(array("whereBusca" => "'".implode("','"...
asked by 18.12.2015 / 14:11
1
answer

problems with accents when running php

Good morning guys, I'm having trouble executing the code php in browser , in any browser, it does not recognize the accent. It was necessary to use the following line of code so that the accent was recognized: header('Content-Typ...
asked by 14.01.2016 / 13:30
1
answer

How to add unmatched parcels with SQL?

I have 3 tables faturas , parcelas and pagamentos . Now I need to mount an SQL to count the parcels that are not removed. I already tried SUM(CASE but it did not work. Structure of the faturas table: id_fa t...
asked by 24.01.2016 / 13:56
4
answers

Show post with ajax

I'm starting to get into jQuery only as I need on my site that a person write an opinion and it appears right below without having to refresh the page. wanted a person to enter anything in the database given that this content appears on the page...
asked by 04.02.2015 / 17:05
1
answer

Can we use {variable} in CodeIgniter Views?

I know that we can use Views.html file in CodeIgniter, now I would like to know if we can use {variavel} tags directly like in Smarty. Example: <body> <h1>{msg}</h1> </body> Are there any native replacement fun...
asked by 22.12.2015 / 15:21
1
answer

Pagination hasMany Laravel 5.1

I have the following relationship in my Model Client: public function Usuario(){ return $this->hasMany('SIST\Models\Admin\Usuario', 'id_cliente'); } I pass the client data by my Controller : $cliente = Cliente::find($...
asked by 22.01.2016 / 14:31
1
answer

PHP function select 2 values

Good! I am creating functions in PHP with the aim of returning the difference between the date TIMESTAMP of the database and today's date, and for this I have created two functions: function getRegistos() { $query = "SELECT *, DA...
asked by 26.01.2016 / 13:21
1
answer

How to resolve memory size error for large files generated with DomPDF?

What happens is that when the HTML (dynamically generated) gets too large, the pdf is not created, and returns this error:    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried   to allocate 64 bytes) in   /home/www/models/d...
asked by 26.04.2016 / 17:01