Se ho capito bene la function
la metto nel file PHP di inserimento, io uso questo codice:Codice PHP:function date_DB($date)
__{
__list($day,$month,$year)=explode("-",$date);
__$res_arr=array();
__$res_arr[]=$year;
__$res_arr[]=$month;
__$res_arr[]=$day;
__$result=implode("-",$res_arr);
__return $result;
__}
questa come si ingloba?Codice PHP:$query = "INSERT INTO tabella (nome,data_nascita)
VALUES ('$nome','$data_nascita')";
Per stampare inserisco questa funzione:Codice PHP:$sql="insert into tabella (id,data) values (23,'".date_DB['tua_data_italiana']."');
Io uso questo codice:Codice PHP:function date_IT($date)
__{
__list($year,$month,$day)=explode("-",$date);
__$res_arr=array();
__$res_arr[]=$day;
__$res_arr[]=$month;
__$res_arr[]=$year;
__$result=implode("-",$res_arr);
__return $result;
__}
anche qui, come ingloboCodice PHP:$query = "SELECT
Grazie in anticipo!Codice PHP:$sql="select * from tabella";
$q=mysql_query($sql);
while ($res=mysql_fetch_assoc($q))
{

Rispondi quotando