Php更新qeury无法正常工作 [英] Php update qeury not working without error
本文介绍了Php更新qeury无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每个人都有项目从哪里获取价值,然后在另一张桌子上更新,这里的代码我觉得代码很好,但我不知道为什么它不起作用:
选择代码正在运行它只是更新
我尝试过:
hi every one i have project where to get value from table and then update it on the another table, here is the code i think the code is good but i don't know why it's not working :
the Selection code is working it's just the updating
What I have tried:
if($server)
{
echo "serve done<br>";
$MutashabehatTable2='SELECT * FROM mutashabehat WHERE SurahNumber=2 AND AyahNumber=1 AND SurahNumber2=13 AND AyahNumber2=1';
$sql = mysqli_query($server,$MutashabehatTable2 );// get Fadwa and sumaih mutashabeha table
$numpOfRows2 = mysqli_num_rows($sql); // similar verses number of rows
echo $numpOfRows2."<br>";
//If there are similar verses
if( $numpOfRows2 > 0)
{
$row = mysqli_fetch_assoc($sql);
$DifferentParts1= "". $row['DifferentParts1'];
$DifferentParts2= "". $row['DifferentParts2'];
$mark= "".$row['Markers'];
echo $MutashabehatTable1='UPDATE \'mutashabeha\' SET SimilarParts = \''.$row['SimilarParts'].'\', DifferentParts1 = \'$DifferentParts1\', DifferentParts2 = \'$DifferentParts2\' , Markers = \'$mark\' WHERE SurahNumber=\'2\' AND AyahNumber= \'1\' AND SurahNumber2= \'13\' AND AyahNumber2= \'1\' ';
$sql2 = mysqli_query($server,$MutashabehatTable1 );// get Fadwa and sumaih mutashabeha table
if($sql2)
echo 'done';
else
echo mysqli_error();
die;
}//end row number if
}//end if connection done
//If conn Failed
else{
die("connection failed: ".mysqli_connect_error());
}
推荐答案
服务器)
{
echo 服务完成< br>;
MutashabehatTable2 = ' SELECT * FROM mutashabehat WHERE SurahNumber = 2 AND AyahNumber = 1 AND SurahNumber2 = 13 AND AyahNumber2 = 1' 跨度>;
MutashabehatTable2='SELECT * FROM mutashabehat WHERE SurahNumber=2 AND AyahNumber=1 AND SurahNumber2=13 AND AyahNumber2=1';
sql = mysqli_query(
sql = mysqli_query(
这篇关于Php更新qeury无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文