Posts by zoy • 61 points
4 posts
-
2
votes2
answers2061
viewsA: Parse error: syntax error, Unexpected end of file in
There was a key missing Trade the last line for <?php } ?>
-
0
votes4
answers2232
views -
1
votes1
answer547
viewsA: Use While twice or more for the same Select?
If I understand correctly you want something like function listarTodosClientes($db,$id=0){ $sql = 'select * from cliente'; if(!empty($id)){ $sql.= " WHERE cli_id = ".$id; } $res = mysql_query($sql)…
-
3
votes2
answers44
viewsA: compare day between dates
/* data no formato Y/m/d */ $dataInicial = strtotime("2017-01-01"); $dataFinal = strtotime("2017-02-01"); $diff = $dataFinal - $dataInicial; echo floor($diff / (60 * 60 * 24)); If you use PHP 5.3…