Posts by Israel Zebulon • 1,758 points
92 posts
-
0
votes2
answers81
viewsA: View data from a database in modals
Note that there is a quote that has not been closed in the code // --------------------------------------- MOSTRAR ------------------------------------ echo" <button class='menubotao'…
-
2
votes3
answers1826
viewsA: Problems creating a login system with PHP and Mysqli
Note that in your code the following line has been declared: $connection = new mysqli($hostname, $username, $password); Further down you stated: $run_user = mysqli_query($con, $select_user); The…
phpanswered Israel Zebulon 1,758 -
3
votes2
answers139
viewsA: Jquery Show does not work in td
You were using . Chick instead of click. Try now. $(".item2").hide(); $("#show").click(function(){ $(".item2").show(); }); <script…
-
0
votes0
answers67
viewsQ: How to receive data from a Codeigniter 3 store
Create a previous store in mysql. Using Codeigniter 3 already configured to use the mysqli driver, I tried to receive the data returned by SP but was not successful. SP: CREATE…
-
1
votes1
answer265
viewsQ: View mysql data using Angularjs/codeigniter
I am developing an application in Codeigniter 3 and came across the following problem. I want to import the database table data and display in a php page. In my controller I created the function:…
-
7
votes1
answer729
viewsQ: Error using Group by in a Mysql VIEW
I created a VIEW to return in a single query the main data I need. CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW v_historicoProcesso AS SELECT p.protocolo AS…
-
1
votes1
answer1653
viewsA: Audio player with custom layout
There are some ways to do it. Case 1: Using HTML5 . Note: May not be supported in older browsers. The code would look like this: <audio controls> <source src="audio/dedinhos.mp3"…
html5answered Israel Zebulon 1,758 -
2
votes2
answers25433
viewsQ: Disable Access-Control-Allow-Origin in Chrome and Firefox
I’m developing an app using Ionic on Macbook with OS X Yosemite. When trying to send data via POST or receive via GET to a remote server, error appears: Chrome: Xmlhttprequest cannot load…
-
3
votes2
answers199
viewsA: Compare the results
I’ve devised a simple code for you to understand what happens. <?php if($_POST){ for($i = 0; $i < count($_POST['Perguntas']); $i++){ if($_POST['Perguntas'][$i] == 'Você tem o segundo grau?'){…
-
12
votes4
answers24420
viewsQ: Turning HTML into PDF
I noticed that on the website of Banco do Brasil it is possible to choose the output format of a voucher txt, pdf, csv without the need to resubmit the page. Is there a library that converts the…
-
2
votes1
answer1183
viewsQ: Difference between JS Dates - Error momentjs
I need to calculate the difference between two dates reported. I need to know the results in years and months and days. I used the momentjs library in conjunction with Angularjs. By setting the…
-
5
votes3
answers198
viewsQ: How to humanize javascript dates
Given a date ex: 24/05/1982, how to transform into years, months and days? In the above example it would be converted into 33 years 1 month and 1 day. The idea is to do everything in Javascript.…
-
1
votes0
answers39
viewsQ: Doctrine Loader Entity
By uploading the project Doctrine cannot load the files from the Entity folder. bootstrap.php use Doctrine\ORM\Tools\Setup; use Doctrine\ORM\EntityManager; require_once…
doctrineasked Israel Zebulon 1,758 -
8
votes1
answer2008
viewsQ: Install Codeigniter 3 with Doctrine and Composer
What is the best way to install Doctrine via commiserate in the codeigniter 3.0? I plan to leave the files in the folder libraries. I created the file composer.json: { "config": { "vendor-dir":…
-
0
votes1
answer126
viewsQ: Error using Doctrine installed via Poser
I installed Doctrine via Poser: { "require": { "doctrine/common": "2.4.*", "doctrine/dbal": "2.4.*", "doctrine/orm": "2.4.*", "phpunit/phpunit": "3.7.*" } } When running unit tests, the file…
-
2
votes2
answers1713
viewsQ: HTML5 tables - subdivide column
I need to sweat the TD of the Steps and Circuits columns into two parts. The idea is that the word "Steps" appears in the TH and the values inserted in this column will be divided into <30 and…
html5asked Israel Zebulon 1,758 -
1
votes1
answer5415
viewsQ: Create directives with Angularjs
The button should display an Alert but nothing, no error appears. What error? Follow the code: angular.module('App', []) .directive('sonclick', function () { return { restrict: 'A', link:…
-
3
votes1
answer8180
viewsA: Insertion of pdf and doc documents
In HTML you can put like this: <form name="form" method="post" action="envia_pdf.php" enctype="multipart/form-data"> <fieldset class="infraFieldset"> <legend…
-
0
votes1
answer252
viewsQ: Codeigniter 2 Paging Error
I made a system in IC 2.0 and detected an error in the pagination. The configuration script is as follows: $this->load->library('pagination'); $query =…
-
0
votes1
answer648
viewsQ: Filter the return of Stored Procedure
I created the following SP: -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored…
-
2
votes2
answers306
viewsQ: Datepicker from Bootstrap
I developed an application using bootstrap (getbootstrap.com). I created a date field and linked the datepicker of the bootstrap itself. How do I change the size of the calendar? I need to show it…
-
6
votes3
answers1111
viewsQ: Load template automatically
It is possible to program the codeIgniter to load the template automatically without specifying the views at each call in the controller? Example user controller public function listar() {…
-
-1
votes1
answer3146
viewsA: Popular table with HTML table data
<!DOCTYPE html> <html> <?php require("header.php"); //iniciar a pesquisa no banco de Dados para povoar a tabela //criar a conexão com o banco de dados $link = new mysqli('localhost',…
-
1
votes2
answers20410
viewsA: Issue with Discontinued Mysql for Mysqli
Based on the file you sent, I changed the mysql functions to mysqli. Goes below. Please replace them with yours surgically. But before changing, make a copy of your original mysql.php file. <?php…
-
2
votes1
answer664
viewsA: How to call PDO in separate system file?
I made a test here and it worked perfectly. Try to run these scripts below: Bench: <?php try { $dsn = 'mysql:dbname=loja;host=127.0.0.1'; $user = 'root'; $password = ''; $objDb = new PDO($dsn,…
-
0
votes2
answers20410
viewsA: Issue with Discontinued Mysql for Mysqli
There is a part of your code that is still using mysql, and needs to be updated. Many changes have been added. Please look at the file /home/vagalume/public_html/decor/system/database/mysql.php on…
-
1
votes4
answers1964
viewsA: Set placeholder with PHP variable
The amendment I suggest is as follows:: <input type="text" name="cliente" maxlength="50" placeholder="<?php echo $cliente; ?>" value="<?php echo $cliente; ?>"/><br/> Realize…
-
1
votes1
answer101
viewsA: Condition between two arrays for calendar
var meses = { Janeiro : "31", Fevereiro : "28", Marco :"31", Abril : "30", Maio : "31", Junho : "31", Julho : "30", Agosto : "31", Septembro : "30", Outubre : "31", Novembro : "30", Dezembro :…
javascriptanswered Israel Zebulon 1,758 -
3
votes1
answer4024
viewsQ: Merge sql results into one line
I have the following database: CREATE DATABASE IF NOT EXISTS `materiais`; USE `materiais`; -- -- Table structure for table `categoria` -- CREATE TABLE `categoria` ( `id_categoria` int(11) NOT NULL,…
mysqlasked Israel Zebulon 1,758 -
-1
votes2
answers682
viewsA: Merge results and cross with another table
Follows a possibility: Create a table and indicate separated by records the id and possible treatments. CREATE TABLE `table_agendamentos` ( `id_table_agendamentos` int(11) NOT NULL, `id_agendamento`…
mysqlanswered Israel Zebulon 1,758 -
1
votes1
answer155
viewsA: Access dated folder by VM
Who is interested, I was able to solve the problem of sharing and access as follows: In the Vagrantfile file generated by Puphpet, I added the Owner and group when it mounts the folder. Saying that…
-
2
votes1
answer155
viewsQ: Access dated folder by VM
My scenario is this:: /media/data/svr/mysql Where is my dated mysql folder located. The development environment is running on Vagrant (debian 6), with php 53 and mysql 5.5 I configured the VM to…
-
1
votes2
answers5760
viewsA: Read multiple integers in the same input in C
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main(void) { printf ("digite qtd de numeros\n"); scanf("%d",…
-
0
votes5
answers1352
viewsA: Previous "Else" without "if" error
Please note the parentheses and the keys. No if you cannot put ; because it closes the block. int main () { float a, b, c, deslta, x1, x2, raiz; printf ("Apesente os valores: "); scanf ("%f",…
canswered Israel Zebulon 1,758 -
1
votes1
answer616
viewsQ: Open Excel file in BINARY_SAFE
I would like to open an existing XLS spreadsheet in PHP, insert data into columns, save and close the file. Is there any function or API for this type of treatment, which opens the file in…
-
0
votes1
answer99
viewsQ: Weblinks do not open in new window
I installed version 3.2 of Joomla and created the weblinks. Both global and individual settings are marked to target one new window, but by clicking the weblink only opens on the same page. I’ve…
joomlaasked Israel Zebulon 1,758 -
0
votes6
answers708
viewsA: How to count the number of clients that returned from one year to the next through SQL?
Adapt this script to your table fields. The return is just the idClient without the repetitions. select o.idCliente from ordem as o where o.idCliente IN (SELECT o.idCliente from cliente as c inner…
-
5
votes2
answers2591
viewsQ: How to set the width of columns in a generated Excel spreadsheet as HTML?
I need to convert an HTML table and generate the file in excel. How to set column width in excel? I create the HTML file using PHP and export using : header ("Expires: Mon, 26 Jul 1997 05:00:00…
-
11
votes5
answers21638
viewsA: Currency formatting to save to database as DECIMAL
In the input field of the edit screen it is necessary to replace the semicolon, so that when saving the function below does not give error. On the edit screen : $valor = $valor = str_replace('.',…
-
12
votes5
answers21638
viewsQ: Currency formatting to save to database as DECIMAL
I am using a mysql database, the format of the field is Decimal (7,2) and he gets his salary. Based on what the user types I store in the bank so: str_replace(',','.', $_POST['txtSalario']) Replace…
-
0
votes4
answers59952
viewsA: Copy files via SSH between two remote servers
uses the scp; Log into the machine a and from it you send to the machine b http://www.vivaolinux.com.br/dica/Utilizando-o-comando-scp $ scp /var/lib/[email protected]:/home/Damasceno files…
-
4
votes2
answers319
viewsA: What should Query be to get a tuple result where the value of a column is 'x'?
Have this example below. Note that in the printf to compare he uses $row["id"], that is, as the index of the array it uses the name of the field you return. In your case if($row['valor de…