我正在尝试更新并将创建的缩略图插入MYSQL BLOB。
我几乎尝试了任何东西,但无法将其创建的图片插入数据库。
function update($email)
{
if(file_exists("$email.jpg"))
{
$image = "$email.jpg";
$tbl = 'tpctmembers';
$query1 = "SELECT image FROM $tbl WHERE email = '$email'";
$result = queryMysql($query1);
$rows = mysql_num_rows($result);
if($rows > 0)
{
$query2 = "UPDATE $tbl SET image ='$image' WHERE email ='$email'";
queryMysql($query2);
}
else
{
$query3 = "INSERT into $tbl(image) VALUES('$image') where email = '$email'";
queryMysql($query3);
}
}
}
谢谢!