0
Un court exemple valant mieux qu’un long discours :
$host = 'localhost'; $base = ''; $user = ''; $pass = ''; $con = mysql_connect($host, $user, $pass); mysql_select_db($base, $con); $req = "SHOW TABLES"; $res = mysql_query($req); $varname="Tables_in_".$base; while ($row = mysql_fetch_object($res)) { echo '<br>'.$row->$varname; $req2 = 'ALTER TABLE `'.$row->$varname.'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'; mysql_query($req2); }
DATE 30 Sep 2010