Posts by Gilmar Alonso • 137 points
16 posts
-
0
votes2
answers672
viewsA: Return columns from belongsToMany Laravel pivot table
MODEL REQUEST (check if the fields in whitPivot are right with your link table) public function produto() { return…
laravelanswered Gilmar Alonso 137 -
0
votes1
answer393
viewsA: How to limit the result of a query to 2 decimal places?
Try something like that SELECT round(CAST(float8 SUM(ValorBruto) as valorBruto),2) FROM faturas WHERE DataCaptura between'2018-10-01' and '2018-10-30'
postgresqlanswered Gilmar Alonso 137 -
0
votes3
answers799
viewsA: Aligning Twiter bootstrap buttons inside a Table
In css add tr{ display:flex; } td{ justify-content: center; justify-items: center; align-items: center; align-content: center; }
-
1
votes1
answer80
viewsA: Prohibit user to register 2 users with equal emails and matriculations
I believe the result['total'], is returning an array. use a Count() to compare if(count($result) == 0){
-
-2
votes1
answer109
viewsA: Solved - Rewrite HTTP to HTTPS with Let’s Encrypt
add the following lines below the rewriteEngine ON and below your rewriteCond RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] thus leaving the code RewriteEngine…
-
4
votes1
answer53
viewsA: Foreach jquery concatenate in table
The problem is that you are using .html() and it will replace each iteration. The correct is to use the append(). $(response).each(function(i) { alert(response[i]); $('#tbody').append( "<tr>"…
-
0
votes1
answer610
viewsA: How to change the font size of all pages using Ionic 3’s Range?
You can use an event that sends the variable to all pages that are being accessed. something like this: in the app.compoenent import { Events } from 'ionic-angular'; constructor(public events:…
-
-1
votes1
answer194
viewsA: Dynamic menu with PHP
From what I understand there, this repeating because you are passing everything to while, and then traversing again with foreach, implement the foreach straight from mysqli_fetch_array because it…
phpanswered Gilmar Alonso 137 -
1
votes2
answers97
viewsA: Slidetoggle in jQuery does not work as it should!
The semantics is wrong, and what you want to display too, instead of you displaying the li, has to display the ul, and also does not need dat toogle, and slidToogle the slidToogle is the same…
jqueryanswered Gilmar Alonso 137 -
0
votes1
answer283
viewsA: Return Select Multiple values
will have to popular with javascript, something like that: <script> var select = $('#restriction_details'); <?php foreach($arraySelected as $opcao){ ?> select.append($("<option…
-
0
votes4
answers3746
viewsA: Insert html file via javascript
Your application is HTML and pure javascript? will not utlizar anything server side? if it is, create the header file. with the header’s separate content or add it via INCLUDE from the language you…
-
0
votes1
answer41
viewsA: Error for service reference in Angular
You have to call him there in the ngModules. make his import there.
angularanswered Gilmar Alonso 137 -
1
votes2
answers1567
viewsA: Error: "Can’t connect to local Mysql server through socket"
Depending on the PHP version and the settings of php.ini using php inside keys, it won’t work, try concatenating to see if this is the error of: $conn = new…
-
0
votes2
answers138
viewsA: Send only the data of the fields completed by e-mail using PHP
You can use a ternary IF. receive the posts normally, which will come empty, and assemble the message with the following structure! $message = $first_name != '' ? 'Nome: '.$first_name : '' . " " .…
-
1
votes1
answer35
viewsA: Notify every 2 hours if new data is entered
Your Approach works, but if the previous table has some input time datetime field for you whenever you run the cron take the last executed time and query records from that time, if you have records…
-
0
votes4
answers301
viewsA: How to find hashtags in a string and store them in an array?
In PHP you use the function preg_replace, with the regex below, it will fetch all words that contain # and return in Matches preg_replace('/\#[A-Za-z-0-9]+/m',$string,$matches); var_dump( $matches…