Silvestro capurso - 2015-02-26 19:09:23
Hi,
I saw your class and I have a question, how can export record from a table mysql to vcard with a while loop mysql_fetch_array?
My code is:
/*
$vcard = new VCard;
$sel= "SELECT * FROM table_utente WHERE reclame_info='1' GROUP BY tel_utente";
$result = mysql_query("$sel",$vcard->conn->_hDB) or die("impossibile collegarsi al database ".@mysql_error());
$num= mysql_num_rows($result);
if($num!=0){
while($contatti = mysql_fetch_array($result)){
extract($contatti);
$nominativo = explode(" ",$nome_cognome);
if($email_utente!='gabriparrucchieri2015@gmail.com'){
$email=$email_utente;
}else{
$email='';
}
$servies [] = array($vcard->setFirstName($record['first_name']),$vcard->setLastName($record['last_name']),$vcard->setCellphone($record['tel_cell_voice']),$vcard->setEMail($record['email']));
}
}
$vcard->outputFile;
*/
But outputfile wirte only the last record.
Best regards