Posts by junio hyago • 95 points
5 posts
-
0
votes2
answers142
viewsA: Word problem using quotes when doing INSERT SQL
Hello friend do not know which language is using for your script but direct on sgbd can realize these two forms. INSERT INTO professor VALUES ('caixa d\'agua'); INSERT INTO professor VALUES ("caixa…
-
1
votes1
answer36
viewsA: How to dynamically assign line break delimiter
can be achieved with a for like this. <?php $str = "linha 1, linha 1, linha 2, linha 2, linha 3, linha 3"; $arr= explode(',', $str); // transforma a string em array. for($i =0;$i<…
phpanswered junio hyago 95 -
0
votes1
answer54
viewsA: Leftjoin does not fetch id values - Laravel
I believe you need ->get() to send Builder public function index(Request $request) { $setores = Setores::get(); $filiais_user = User::leftJoin('filiais_users','users.id','filiais_users.users_id')…
-
0
votes1
answer27
viewsA: Help with SQL and PHP
<?php $host = "mysql:dbname=agendamentos;host=phpmyadmin.srv-45-34-12-242.hostoo.io"; $usuario = "agendamento"; $pass = "####"; try { …
-
0
votes1
answer198
viewsA: Laravel Request validation exists and nullable at the same time
You can use it that way public function rules() { return [ //... 'campo_id' => 'nullable|exists:tabela,pk', //... ]; }