Posts by Luís Eduardo • 42 points
4 posts
-
0
votes1
answer95
viewsA: Create php list of valid ips for a mysql table
$ip = '10.5.'; for ($redeB=5; $redeB < 21 ; $redeB++) { for ($redeC=1; $redeC < 255; $redeC++) { echo $ip.$redeB.'.'.$redeC.'<br>'; } } The first is to tell rede B, the second is to tell…
-
-1
votes2
answers116
viewsA: Creating a program in Python
You’re using accents in variables. Do not start variables with uppercase letters or special characters if you have to use 2 words in a variable use nome_grande or nomeGrande and never use accents.…
pythonanswered Luís Eduardo 42 -
1
votes2
answers128
viewsA: Date balance in mysql
Get the date you use Day/Month/Year convert to Year/Month/Day, take the year and month the date provides and put in query. // Data recebida Dia/Mês/Ano $data = '01-11-2018 22:02:01'; // Converta a…
-
1
votes2
answers334
viewsA: Count items separated by semicolons in mysql table field
Use the function explode(";", $tags) to remove the ';' to separate tags, and array_count_values() to count how many equal items are in the array: <?php $tags =…