Posts by Sr. André Baill • 6,946 points
384 posts
-
0
votes1
answer672
viewsQ: Remove Registration in jQuery
I would like you to click Delete, delete the mysql database record.. No re-load the page... using jquery.. Can anyone inform? Grateful
-
-1
votes3
answers138
viewsA: How to include decimal in PHP condition
Try it this way, see if it helps... $var_a = "1111.1"; $var_b = NULL; if($var_a <= "1111.1"){ $var_b = 1; } elseif($var_a >= "1111.1" || $var_a >= "9999.99"){ $var_b = 2; } return $var_b;…
phpanswered Sr. André Baill 6,946 -
0
votes1
answer629
viewsQ: Encrypt with MD5 the image name coming from PLUPLOAD
I have the code I use to upload using PLUPLOAD. But I didn’t want the name of the original photo, I wanted it to come ENCRYPTED, using md5. I am recovering the data and comes the original name of…
phpasked Sr. André Baill 6,946 -
2
votes4
answers4570
viewsA: How to avoid multiple access with the same login and password
Create a field called ativo in your database, when logging in, seven as 1, and logging out seven as 0. Logged in, check if it is the ativo=1, you put the message: this user is already logged in,…
phpanswered Sr. André Baill 6,946 -
2
votes1
answer126
viewsQ: System logs alone in any action
Gentlemen, In my Administrative system I log in normal... However, any action within the system, it logs out alone... Without clicking on anything logout... Would anyone like to describe me if…
-
0
votes2
answers1669
viewsA: Foreach with database records
Your reply was valid. I wrote otherwise also, that worked... <div class="line" style="height: 70px;"> <table style="width: 100%;"> <? $contagem = 0;…
-
2
votes2
answers1669
viewsQ: Foreach with database records
In my database I have a table called cadastroatendo within this table I put the days of attendance. I am recovering the data through the foreach... which in turn the array returns this result:…
-
-2
votes2
answers59
viewsA: Determine execution according to home page
Do it this way: On the previous page: session_register("pagina_atual"); And on the new page: if($_SESSION['pagina_atual']=="exibir"){ pagina exibir } else { pagina outra }…
phpanswered Sr. André Baill 6,946 -
1
votes1
answer493
viewsA: Subtract row from one table by another table
I would do it this way: include 'conexao.php'; extract($_POST); /* Lembrando que ao passar os posts, nas variaveis de insert, são as mesmas dos campos vinda no POST */ $sql_insert = mysql_query("…
-
1
votes3
answers300
viewsA: Relationship of tables
Follow the SQL tested by the database you gave me... From what I understand, it would be this. SELECT * FROM cad_estagio AS cde LEFT JOIN cad_trabalho ON cad_trabalho.id_trabalho = cde.id_trabalho…
-
3
votes3
answers644
viewsQ: Data Datepicker - Processing
Sirs: The date I have on datepicker is in format dd/mm/yy, however, the date in the database is yy-mm-dd (date field). How do I make datepicker to display the default BR date and when it comes via…
-
1
votes0
answers69
viewsQ: Different Date Format
Sirs, I have the following code: $funcionario_blocodcon_novo = array(); for($i=0;$i<count($funcionario_blocodcon['localtrabalho']);$i++){ foreach($funcionario_blocodcon as $key=>$val){…
-
1
votes3
answers561
viewsQ: Search multiple Mysql tables
I have the following SQL SELECT * FROM cliente as c INNER JOIN cliente_contato as ct ON ct.nome LIKE '%{$pesquisa}%' OR ct.telefone LIKE '%{$pesquisa}%' JOIN cliente_ip as cip ON cip.detalhes LIKE…
-
0
votes1
answer50
viewsA: jQuery Add Group Fields
Well, over time I went to find a solution and found the next one and it worked... if it works for anyone..: var countServs = $("#countServs").val(); var table = $("#servicosTable"); var modelo =…
jqueryanswered Sr. André Baill 6,946 -
1
votes1
answer50
viewsQ: jQuery Add Group Fields
I have the following jQuery - Addservico var countServs = $("#countServs").val(); var table = $("#servicosTable"); var modelo = $("#servicoModelo").html(); modelo = replaceAll(modelo, 'COUNT',…
jqueryasked Sr. André Baill 6,946 -
2
votes1
answer54
viewsA: Model_lock - Customizing Code
If it helps anyone, I developed this solution: public function fechamentoChamada($data_inicial = null, $data_final = null, $idCliente = null, $idFuncionario = null, $view = null, $tipo_chamada =…
-
1
votes1
answer54
viewsQ: Model_lock - Customizing Code
Gentlemen, I have the following PHP code: # Fechamento Chamada public function fechamentoChamada($data_inicial = null, $data_final = null, $idCliente = null, $idFuncionario = null, $view = null,…
-
1
votes2
answers95
viewsA: What is the best way to structure a Mysql tree table?
A possible form would be the table for categories (tb_categorias) containing the following columns: idCategory idSubCategory nomecategoria If idSubCategoria = 0, she is category Father, if it’s…
mysqlanswered Sr. André Baill 6,946 -
1
votes1
answer608
viewsQ: Recover data in jQuery form
called js. function clienteChange() { var id = $('#idCliente').val(); $.ajax({ url:"/Entregas/clientes.endereco.php?id=" + id, dataType : 'json', success:function(result) {…
-
0
votes0
answers548
viewsQ: Populating Cities/Neighborhoods in jQuery with fields in Array
I have the following JS. <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.js"></script> <script type="text/javascript"> $(document).ready(function(){…
-
1
votes0
answers296
viewsQ: Calculation of Freight Table
I have the following freight table I have the following neighborhood table Where on the table -> idSaida = 1 = Centre and idDestino = 2 = Abranches In this case a product will be collected at the…
-
1
votes1
answer808
viewsA: Upload with Codeigniter error
Friends, I was able to point out the solution. If it fits someone, there it is: In the controller I made this function. public function clienteAdicionar(){…
-
1
votes1
answer808
viewsQ: Upload with Codeigniter error
Good evening. I would like help if possible. controller/documents.php public function clienteAdicionar(){…
-
3
votes1
answer31
viewsQ: Error running Field Checklist
I have the following code: $funcionario_materiais = array(); foreach($_POST AS $key=>$val){ $tmp = explode("_",$key); if($tmp[0]=="materiais"){ $funcionario_materiais[$tmp[1]]=$val;…
-
0
votes1
answer41
viewsQ: List calls with or without idFunctioned
Sirs. I have the following function. $sql = " SELECT c.*, cli.*, cli.razaosocial as nomeCliente, c.idCliente as idClienteChamada FROM chamada as c, cliente as cli WHERE c.idChamada = '".$id."' AND…
-
2
votes1
answer973
viewsQ: Change field Automatically after filled
I have a form: <div class="span12" style="padding: 10px;"> <form action="<?php echo base_url()?>index.php/chamadas" method="get"> <div class="span2"> <label for="">Data…
-
0
votes1
answer452
viewsQ: Search records from one date to another
The company has the base closure of "21 to 20" each month. Would you like to know how I make SQL only search for the records that are inside the lock? Ex: my closing this month is: 21/05 to 20/06,…
-
0
votes3
answers125
viewsA: mysql UPDATE, does not receive function value in PHP
Change that line: $id = pega_assunto_por_nome_menu($_GET['assunto'])['id']; By this line: $id = pega_assunto_por_nome_menu($_GET['assunto']['id']);
-
0
votes1
answer236
viewsQ: Freight Table - District Listing
I have a table called bairro: I have a table called tabelafrete: I have the following SQL public function getBairroList() { $sql = "SELECT * FROM bairro as b Left join tabelafrete as t on b.idBairro…
-
0
votes1
answer26
viewsQ: Return of Equal Employee
I have the following code $sql = " SELECT c.*, cl.razaosocial, cl.idCliente FROM chamada as c, cliente as cl WHERE c.idCliente = cl.idCliente"; $consulta = $this->db->query($sql)->result();…
-
3
votes1
answer162
viewsQ: Ajax Address Search with PHP
I have a form with the client list. When selecting the customer, I want you to automatically fill in the address, number, neighborhood and city fields. I have Ajax, but I don’t know how to elaborate…
-
5
votes1
answer3205
viewsQ: Search field in the <select> form
Good night, I would like to know how to in the list of a select enable "search" within the field? <select class="input-xxlarge" onchange="clienteChange()" style="width: 409px !important;"…
-
0
votes5
answers3030
viewsA: Codeigniter -> Message: Trying to get Property of non-object
The final version of getById looks like this public Function getById($id){ $this->db->where('idContrato',$id); $this->db->limit(1); $consulta =…
-
0
votes5
answers3030
viewsQ: Codeigniter -> Message: Trying to get Property of non-object
I’m trying to fix this bug: Severity: Notice Message: Trying to get Property of non-object Filename: contracts/view.php Line Number: 37 CODE: contratos_model.php public function getById($id){…