PHP MYSQL乱码
时间:2006-03-19 来源:liuxingyuyuni
query("SET NAMES 'gb2312'");
if(mysqli_connect_errno())
{
echo mysqli_connect_error();
}
else
{
$query = "select * from mytable";
$result = $conn->query($query);
if($result)
echo "OK!!!!!!!!
";
while( $row = $result->fetch_object() )
{
echo $row->username."--".$row->password."
";
}
}
?>
if(mysqli_connect_errno())
{
echo mysqli_connect_error();
}
else
{
$query = "select * from mytable";
$result = $conn->query($query);
if($result)
echo "OK!!!!!!!!
";
while( $row = $result->fetch_object() )
{
echo $row->username."--".$row->password."
";
}
}
?>
相关阅读 更多 +