Posts by Evandro Lacerda • 326 points
13 posts
-
4
votes1
answer35
viewsA: Git and Github: Need to remote more than once?
The command git remote add origin usually only used once for each remote repository, so the remote configuration is saved in your local repository. You can use the command: git remote -v to show…
-
1
votes1
answer146
viewsA: Retrieve JSON user data by jquery
In my humble opinion you could create a different endpoint to search for the individual user record, one for the user search and one for all users. For example: url /users for all users and the url…
-
0
votes2
answers149
viewsA: transformar Y-m-d H-i-s em d-m-Y H-i-s
Use date together with the function strtotime(), thus date('d-m-Y H:i:s', strtotime($dataVindaDoBanco));
-
2
votes1
answer13106
viewsA: Error Code: 1136. Column Count doesn’t match value Count at Row 1
In your SQL statement in the description of the fields there are 8 fields "cpf, nome, nascimento, endereco, cep, bairro, cidade, uf)" and in the place of values there are 9 values "('04496332780',…
-
2
votes1
answer40
viewsA: Error sending information to the bank. Editing form
Form Fields do not have the attribute name, so they’re not being received in the controller. Follows correction: @extends('layouts.app') @section('content') <div class="container"> <form…
-
1
votes1
answer66
viewsA: Error url $feed->id
I believe the problem lies in this passage <a href="{{url('/feed/$feed->id/update')}}">Editar</a> home.blade.php file where $feed->id is inside simple quotes. Try it this way:…
-
0
votes2
answers3033
viewsA: Set current date in PHP and put HTML value in an input type='date'
The value attribute format of the type field date should be in format yyyy-mm-dd or the php format (date('Y-m-d')), the format displayed will depend on the browser location setting. Note that not…
-
0
votes2
answers513
viewsA: Criteria for consultation with a wildcard character
Change the sql variable to a mysqli_prepare function call by passing the sql string as parameter then use the msqli_bind_param function to attach the $year parameter. Follow an example, will have to…
-
0
votes2
answers513
viewsA: Criteria for consultation with a wildcard character
If the problem is the concatenation of the string '%' in the variable of the parameter, you can try as in the following example using the CONCAT function of SQL: $sql = "SELECT item_title FROM item…
-
0
votes2
answers459
viewsA: Page php, Not Saved In Bank ! Why?
Looking at your code in Query1 there is an error in the sql string in the WHERE condition: $query1 = @msql_fetch_row(@msql_query("SELECT * FROM email WHERE = '$email'")); Change it to: $query1 =…
-
2
votes1
answer165
viewsA: Laravel - Relationship Manytomany Extra Columns
You can use the method withPivot when declaring the relation and providing the additional fields, follow an example. public function empresas() { return $this->belongsToMany('\App\Empresa',…
-
2
votes4
answers9952
viewsA: How to make Mysql return utf-8?
If you are using mysqli, use the mysqli_set_charset($Connection,"utf8") function. This function sets the default character set for sending and receiving data to the Database. If you are using PDO…
mysqlanswered Evandro Lacerda 326 -
1
votes4
answers1009
viewsA: Connecting PHP to the Mysql database
Friend, alternatively you can use PDO, which is a more consistent way of using multiple databases. The mysql_* functions have been deprecated from PHP 7.0 if you still use an older version of PHP…