Posts by Diéfani Favareto Piovezan • 558 points
29 posts
-
0
votes4
answers239
viewsA: Problems with paging on the search page
Use sessions to store in a variable, which has been searched. The way you are doing, it takes the value of the field but when switching pages this field becomes empty. You can use cookies also, but…
-
0
votes2
answers1112
viewsA: regex for url validation
Try this one below, I made and tested on Tester from Regex did to accept url place and ip ^[a-zA-Z0-9-_]+[:./\\]+([a-zA-Z0-9 -_./:=&"'?%+@#$!])+$ I tested all the values below and it worked…
-
1
votes1
answer206
viewsA: Pick up information using a dropdownlist as select
To return all the values you need it is necessary to make one JOIN with the Buy Table. I’ll give you an example, the SELECT below will return all the columns of Supply and Purchase but you can…
-
2
votes2
answers217
viewsA: Hide field from select mysql
You need permissions, there is no specific command but you can do so: SET @sql = CONCAT('SELECT ', (SELECT REPLACE(GROUP_CONCAT(COLUMN_NAME), '<colunas_omitidas>,', '') FROM…
mysqlanswered Diéfani Favareto Piovezan 558 -
2
votes1
answer964
viewsA: I lost my script to recover?
The Workbench as well as the Office makes a auto save. If you use version 6.3 which is the most current, go to C:\Users\\AppData\Roaming\MySQL\Workbench\sql_history and you will find the scripts…
-
1
votes3
answers1298
viewsA: Perform table insertion with foreign key
You added KEY instead of FOREIGN KEY, ie, your table has Dice but no foreign key. This way will definitely give error of CONSTRAINT and FK. Take a backup first and then give a DROP TABLE talhao. It…
-
0
votes3
answers1589
viewsA: How to redirect user after login according to user type?
Your code is wrong, you can’t use a condition within a else and you didn’t use it either ; after the last parentheses of header no Adm user. Fix by: <!-- INICIO HTML LOGIN --> <?php if…
-
1
votes2
answers162
viewsA: Broken values in installments, how to insert in the first the 3rd decimal place?
You can use round() for example, round($valor_parcelas); Or round($valor_parcelas, 2, PHP_ROUND_HALF_ODD);
phpanswered Diéfani Favareto Piovezan 558 -
2
votes2
answers113
viewsA: Improve a Bank Search
If you do not know in which field will be the value searched or even know but want to do a general search in the fields using the value typed, the ideal is to make a SELECT and use CONCAT within the…
-
0
votes1
answer521
viewsA: Mysql Create a database for a single user
An example CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'usuario'@'localhost'; After assigning everything, run the command FLUSH PRIVILEGES; to reload…
-
2
votes0
answers54
viewsQ: Dropdown dependent upon DIV loading
I have in the file Fields.php the code below, which selects the company and according to the request will load divs with specific fields for that request. On the first request, I have to load the…
-
4
votes2
answers23084
viewsA: Centralize DIV
It will depend a little on the type of centralization you want. I’ll put some examples here. Centralization with margin .center1 { margin: auto; width: 80%; background: #fff; border: 3px solid…
-
2
votes2
answers222
viewsA: Button show div 1 and hide div 2 and vise versa
Try a JavaScript thus <script type="text/javascript"> function fechar_abrir(objeto) { if (document.getElementById(objeto).style.display == "none") {…
-
0
votes1
answer72
viewsA: How to make my image appear inside the ui:repeat tag?
Try <ui:repeat value="#{livroBean.listaCompleta}" var="livro"> <p:fieldset legend="#{livro.titulo}" style="margin-bottom:20px"> <h:panelGrid columns="2" cellpadding="5">…
-
2
votes0
answers58
viewsQ: The loaded screen is correct but the data is saved in another BD table
on the company website, we are doing some tests with scheduling. Problem is that although you are loading the correct screen on the website (the scheduling form), the data that the client types, are…
-
1
votes1
answer192
viewsQ: In a dependent SELECT, with data of cities of a table how to leave a city in evidence?
In a database, I have the States table and the Cities table. On the website, when I choose a state, the list of cities is populated according to it. In my code, it is to appear alphabetically, but I…
-
0
votes2
answers2074
viewsA: Checking remaining days between current date and contact deadline
You’re putting $ValorUm = $date; The variable you created is date and not Date, you are putting with "e" instead of "a" at the end and so it is going wrong. $ValorUm = $data; Whereas you need the…
-
1
votes1
answer249
viewsA: Login does not work
Unfortunately my score does not allow comments but why is your database name with spaces instead of underline? Uses double quotes otherwise it does not detect the right database.
-
1
votes3
answers1607
viewsA: How can I view data using JOIN?
The problem is this: You’re doing JOIN with two tables that do not correlate. There is no key or value within both that correlates them, you are making a JOIN of Id do usuário with the Id da Prancha…
-
0
votes1
answer623
viewsQ: I need Error Help when trying to install Composer
I am doing maintenance and improvements on a site using Codeigniter v2.x and one of my client’s requirements, was to log in using Facebook. The problem is I need to install the Composer and I’m not…
-
2
votes2
answers120
viewsA: Insert text into images
Tooltip does what you need, below is an example of how you would look without the Switch. <asp:Image ID="Imagem1" runat="server" AlternateText="Smiley Face" ImageAlign="left" ToolTip="Status da…
-
2
votes4
answers3541
viewsA: How to bring records of a LEFT JOIN even if not obeying the WHERE?
I believe that the code below solves your problem, just a hint, I know you want to return all fields of both tables but sometimes two tables have some field with the same name and ends up giving…
-
2
votes1
answer304
viewsQ: I need help with Jquery and/or JS for dependent Drop Down Menu
I am developing a program where there is a drop down menu that matches the Monthly, Weekly or Daily values that are the periodicity in which a system task must be executed. Ai has a second drop down…
-
2
votes0
answers281
viewsQ: Trigger in Mysql for movie rentals?
I need a little help because the teacher said not to use FUNCTIONS and PROCEDURES, ONLY the TRIGGER. It follows image of what he is asking. I’m really not able to do. For me there had to be before a…
-
3
votes2
answers634
viewsQ: How to mark/deselect checkboxes per column using Jquery
Here at the company we are doing a plant management. The apartments/units that have equal end (for example, Apto 1, Apto 11, Apto 21) and so on, are below each other in the construction and for this…
-
1
votes4
answers179
viewsA: How to display files without underline?
Whenever manipulating files, their names must be without special characters, with underline or without spaces. You used child with cake.jpg and at some point in the method glob(); the program did…
phpanswered Diéfani Favareto Piovezan 558 -
4
votes13
answers20263
viewsA: What makes a language to be considered low/high level?
To high-level language has a higher level of abstraction, making it more like human language and leaving it farther away from machine code. The low-level language is more like machine code and uses…
-
2
votes2
answers125
viewsA: Show date field information - php symfony
I’ll show you a function that I use here that converts from English to Portuguese date format Class datas { public function ajusta_data($char1,$char2,$dt) { if ($char1 == "-") { if ($dt <…
-
1
votes4
answers9200
viewsA: Query using like operator
You can use it LIKE to recover a date in your database because DATETIME or DATE sane strings, although it is more correct to use the commands used above by others. You just have to do it like this…
sqlanswered Diéfani Favareto Piovezan 558