Posts by Flávio Kowalske • 215 points
30 posts
-
2
votes1
answer42
viewsA: Send user name in SESSION with form
If the user data is written to variables in the Session, you can for example send the data to the code that runs the Insert in the table like this for example: <form action="" method="post">…
-
0
votes1
answer69
viewsQ: How to capture Mysql error 1452 and present message to user?
I have the function below that makes the insertion of a new record in a database. // INSERE UM NOVO REGISTRO NO BANCO DE DADOS function save($table = null, $data = null) { $_SESSION['message'] =…
-
0
votes2
answers91
viewsA: How to access the elements of a String in Jason format in Javascript
If I pass an object instead of a string, how would I access the data? The object has this structure: object(stdClass)[3] public 'tipo' => string 'Carro' (length=5) public 'marca' => string…
-
-3
votes3
answers62
viewsA: When displaying the site on mobile, the input with Submit defaults. How to solve ? I am using bootstrap 4
Check if there is a tag on your site below: <meta name="viewport" content="width=device-width, initial-scale=1">…
bootstrap-4answered Flávio Kowalske 215 -
-1
votes2
answers91
viewsQ: How to access the elements of a String in Jason format in Javascript
I cannot print the values contained in a string in Jason format using Javascript in a modal containing multiple definition lists. I imagine it’s some syntax error in the access but I couldn’t solve…
-
1
votes1
answer157
viewsQ: Native Javascript date formatting does not work
I have a modal filled via Javascript. The Javascript code is as follows:: // INTERFACE MODAL viewVenda $(document).ready(function () { $(document).on('click', '.view_data', function () { var id =…
javascriptasked Flávio Kowalske 215 -
0
votes1
answer45
viewsA: Set radio input as checked in modal using Javascript
I was able to solve by changing the Javascript code to: if (status == "A") { $('input[id=status0]').prop('checked', true); } else if (status == "I") { $('input[id=status1]').prop('checked', true); }…
javascriptanswered Flávio Kowalske 215 -
0
votes1
answer45
viewsQ: Set radio input as checked in modal using Javascript
I have a modal that receives data from a BD. Data transport is ok. One of the camps is like radio, with the following code: <div class="row"> <label…
javascriptasked Flávio Kowalske 215 -
1
votes2
answers61
viewsA: Javascript function to return 3 separate values
Bins as it would be if the view.php file had the following structure: $resultado = array($row_user['id_tipo'], $row_user['tipo'], $row_user['status']); print_r($resultado); In the HTML the Java…
-
0
votes2
answers61
viewsQ: Javascript function to return 3 separate values
In the code visualize.php i do select no BD and I award a Table with the result of select and store in a variable $outworking. This variable is read by Javascript and written to . I would like to…
-
0
votes0
answers65
viewsQ: Problems with Table Modeling with Two Foreign Keys
I need to finish a modeling of a database and I’m at an impasse. Simply put, I have 3 tables as follows: PROMISSORY NOTES CREATE TABLE IF NOT EXISTS `picinin`.`promissorias` ( `id_promissoria` INT…
-
0
votes1
answer77
viewsQ: Modal with id=Undefined
Guys I’m having trouble with a code. The fragment below calls the modal: <a href="#" class="btn btn-default btn-sm" data-toggle="modal" data-target="#delete-modal" data-client="<?php echo…
-
0
votes2
answers48
viewsQ: Perform multiple operations in a single SQL code
I have a table in Mysql as follows and structure: I would like to run an SQL query that does the following operations: Total number of records (total1); Count how many records have id_nps_answer…
-
0
votes2
answers674
viewsQ: SELECT with repeated field
I’m having trouble executing an SQL query. The consultation is: SELECT DISTINCT…
sql-serverasked Flávio Kowalske 215 -
0
votes2
answers59
viewsQ: Insert HTML code in Client-side form without using PHP
Guys I have two external files called header.html and footer html containing headers and footer of a site, with menus and etc. I need to include these external files in the site pages without using…
-
1
votes0
answers20
viewsQ: Registration and Custom Widgets in Wordpress
We have a Wordpress site already in operation and we need to develop a functionality in the same that enables the following: Allow a DJ to register and create his site profile; Create a page that…
-
-3
votes2
answers77
viewsQ: Error when Count() less than 1
I have a code that checks how many records an sql query returns. <?php if ($results) { $total = count($results); } if ($total > 0) { echo "<p>Encontramos " .count($results). "…
phpasked Flávio Kowalske 215 -
1
votes2
answers62
viewsQ: censor a registered word in a database
Is there a way to censor and replace a word registered in Mysql through a precedent or Trigger for example? The word in the case would be Flash House and I need it replaced by Old School.…
-
1
votes2
answers853
viewsQ: COUNT in several tables
I have two tables in my system, and I need to count two columns in the tables. I currently do through a VIEW as follows: CREATE VIEW totais AS (SELECT (SELECT COUNT(publications.id) FROM…
-
1
votes3
answers1468
viewsA: Add a div by clicking the button
I needed something similar and used this code as a base. See if it helps... <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script…
-
1
votes1
answer92
viewsQ: What is the best practice for consulting in large tables?
I have a system composed of several tables.One of the tables is called Publications and contains 15 varied fields, 3 of which are the main ones of my doubt: 1. titulo - varchar(100) 2. subtitulo -…
-
0
votes1
answer2801
viewsQ: MYSQLI - Trying to get Property of non-object in
I have the following function: function sql_update_views ($table = null, $id = null) { $database = open_database(); $found = null; try { $sql = "UPDATE ".$table." SET views = views + 1 WHERE id =…
-
0
votes4
answers216
viewsQ: Create links with tags registered in the database
I have a field in the MySQL with the following content: Alesso; Anitta; Billboard; Marshmello; Poo Bear I need to take each of the values separately and create a link like this: <a…
-
0
votes3
answers2649
viewsQ: SQL to search the entire database
Is there a command to select all tables in a mysql database? Like I have several tables in my database with diverse content. I need a way that a user can search for a keyword in all tables.
-
1
votes1
answer537
viewsQ: Function mysql_insert_id() returns only zero
I am having problems with the function mysql_insert_id(), when I use the form below the value returned is always "0" (zero). Can help me? The "add" function calls the "save" function". OPEN_DATABASE…
-
1
votes4
answers188
viewsQ: Increment in Javascript function
I’m having trouble making an increment in a javascript function. I have a table with the following structure: <table id="products-table"> <tbody> <tr> <th>Produto</th>…
javascriptasked Flávio Kowalske 215 -
0
votes1
answer138
viewsQ: Javascript function for generic use
I have a simple javascript function that calculates the value of one field multiplied by the value of another and inserts it into a third. Below the code: function multiplica() { var quantidade =…
javascriptasked Flávio Kowalske 215 -
1
votes3
answers115
viewsQ: How to access an array and export variables?
I have a code that receives the data via $_POST on a form as follows: ... $certificate = $_POST['certificate']; ... If you make a print_r($certificate) the result is as follows: Array ( ['cliente']…
-
0
votes0
answers40
viewsQ: What is the best way to generate PDF with PHP?
Currently what is the best way to generate PDF with PHP using HTML or database? I’ve been looking at some libraries, but a lot of them have no documentation or are obsolete. The very one PHP has…
-
0
votes1
answer27
viewsQ: Select some data from different tables
Reborn the programmer around here, I’m having trouble with SQL and ask for help. I have two tables called orcamentos and clientes. I need to select all fields in the table orcamentos and only the…