Posts by Miguel Neto • 117 points
7 posts
-
3
votes2
answers117
viewsQ: Doubt in the security of PHP PDO
I would like to know the difference in safety level between the two code snippets below: // TRECHO 1 <?php $calories = 150; $colour = 'red'; $sth = $dbh->prepare('SELECT name, colour, calories…
-
-3
votes1
answer684
viewsA: Is it possible to use composite key for Entity Framework with Model First?
Yes, as follows public class ActivityType { [Key, Column(Order = 0)] public int ActivityID { get; set; } [Key, Column(Order = 1)] [Required(ErrorMessage = "A ActivityName is required")]…
-
2
votes3
answers7154
viewsA: How to hide directory paths in htaccess url?
You can use . htaccess to rewrite the URL Current URL www.meusite.com/arquivos/arquivo.php .htaccess RewriteEngine on RewriteRule ^arquivo\.php$ arquivos/arquivo.php URL www.meusite.com/arquivo.php…
-
2
votes5
answers269
viewsA: Changing text in several different places of the HTML page
You can use Jquery $("#i18n_label_name").html("TEXTO"); $("#i18n_label_contact").html("TEXTO"); With this $("#i18n_label_name") selector, it goes straight into the element without having to scan all…
-
3
votes4
answers18875
viewsA: Change color of button text by clicking
You can use the pseudo class &:active{ //aqui vem como você quer que ele fique quando for clicado } the same way you used Hover
-
1
votes2
answers142
viewsA: Insert time function value in mysql
A much more elegant solution is to change the data type of the data column as timestamp and leave as default CURRENT_TIMESTAMP ALTER TABLE posts MODIFY COLUMN data TIMESTAMP DEFAULT…
-
1
votes2
answers2710
viewsA: Take random value mysql
You can try to catch all users at once. SELECT DISTINCT * FROM users LIMIT X ORDER BY RAND() Where X is the number of users