Posts by juniorb2ss • 2,503 points
63 posts
-
2
votes2
answers2125
viewsA: Copy (cp) to current folder on LINUX
Oops. I believe you’re looking to create symbolic links. SYMBOLIC TYPE In the symbolic link type, the link is a special disk file of the link type, which has as content the path to reach the target…
-
0
votes3
answers5260
viewsA: Laravel: Migrations
Speak David, all good? Migration also supports schema changes, not just creation. A great library to facilitate this is Laravel Generators https://github.com/JeffreyWay/Laravel-4-Generators Example…
-
0
votes3
answers9425
viewsA: Eloquent with does not Inner Join?
Everyone has this doubt regarding the "why not use John" of eloquent, well, I’m not so much on the inside either... but I really believe that it is because of some performance or ambiguity. By using…
-
7
votes1
answer1843
viewsA: Multiple schemas in Laravel 5 database
The best way to work with multiple banks in the Laravel is this way: In the configuration file you can define all the drivers to be used and the banks: return array( 'default' => 'mysql',…
-
1
votes2
answers2912
viewsA: Write to two different tables using the same View
Talk buddy, all right? Come on! Apparently the case is of hasOne relationship... as well? Your suppliers table works with n:1 relationship for addresses. Fixing that in your model you have defined…
-
0
votes2
answers123
viewsA: Problems with Insert logic
Well, in this case it is interesting to do an update query with condition, without needing to impose logic within the scope of your script. An example: UPDATE sua_tabela SET sit = CASE WHEN (SELECT…
-
1
votes1
answer156
viewsA: Homestead Laravel Problem with Drive Postgres
This error occurs because the extension was not found or disabled. To activate it, go to: /etc/php5/fpm/ Open the php.ini file, with the editor you prefer. Look for the line:…
-
0
votes2
answers181
viewsA: Relation between 3 tables and find the result of last week mysql
Try: $sql = mysql_query("SELECT * FROM tbl_categorias cat WHERE ( SELECT 1 FROM tbl_categoria_recurso cat_r JOIN tbl_recursos r ON `r`.`id` = cat_r.id_recurso WHERE cat_r.id_categoria = `cat`.`id`…
-
2
votes1
answer2255
viewsA: Change language of the site
I couldn’t identify the problem, it might be something outside the scope of the script you gave us, but I made it free to rewrite your script. https://gist.github.com/juniorb2ss/a3db0d9b0fab03406a89…
phpanswered juniorb2ss 2,503 -
3
votes1
answer1426
viewsQ: Trigger UPDATE write TXT file
How can I create a Rigger that is fired every time I have one UPDATE in x column, grab the new value create new txt file and insert inside it. ( for synchronization purposes ). For example: produtos…
-
4
votes1
answer8024
viewsQ: How to determine permission to use tables?
How can I make a certain user "see" one table and another not? I’ve been doing some research, I found the DENY SELECT ON *** but I was unsuccessful.
-
5
votes2
answers7608
viewsQ: How to create a Rigger that is fired every time you have an insert event in the table?
I need to create a Trigger that is triggered every time there is an insertion event in the table, before the insertion is made, it checks a condition, if the condition is met it changes the value of…
-
3
votes1
answer2098
viewsQ: Insert SQL Server records via ftp file.txt
I have the following structure in a file . txt of an FTP server: CodigoPedido: 120952 DataPedido: 2014-03-11-10:19 LocalVenda: MERCADO LIVRE Status: A ENVIAR Parceiro: 0 IdCliente: 103002…