PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
include("ConnectDBParadiso.php");
mysql_select_db("$ConnectDBParadiso") or die ("Erro ao ligar à Base de Dados da Sonika-Event");
$select = "SELECT * FROM tabClientes";
$result = mysql_query($select);
$size = mysql_num_rows($result);
echo $size;
$i = 0;
while($result_ar = mysql_fetch_assoc($result)){
$varIdade = "28";
$update = "UPDATE tabClientes SET Idade = '$varIdade' WHERE $i = $i";
mysql_query($update);
$i+=1;
}
date_default_timezone_set('Europe/London');
function functCalculateAge($birthday){
return floor((time() - strtotime($birthday))/31556926);
}
I'm with this a few days and can't get it to work. Tried many things but with no success.
Thanks!
Last edited by Benjamin on Fri Oct 29, 2010 4:49 am, edited 1 time in total.
Reason:Added [syntax=php] tags.