我的代码发出了此警告,但是当我打印行时,它会显示所选的值。 那么我该如何解决呢?
这是代码"
$ query3 =("从scrubnurse b中选择b。*,c.ScrubNurseName,手术a,scrubnurselist c
其中b.rn_no =' $ id'
和.SurgId = b.SurgId
和b.ScrubNurse = c.ScrubNurseID
订购b.SurgId,b.SerialNo");
$result3 = mysql_query($query3) or die(mysql_error());
$row3 = mysql_fetch_array($result3);
<?php
/*try utk display scrubnurse */
print_r($row3);
while($row3 = mysql_fetch_array($query3)){?>
<p>Scrub Nurse : <?php echo $row3['ScrubNurse'];?>
<p>Status : <?php echo $row3['Status'];?>
<?php }
这是print_r($ row3)的结果
Scrub Nurse Array([0] =&gt; 16
[SerialNo] =&gt; 16 [1] =&gt;
rand52fad80207b6a1.33040579 [SurgID] =&gt; rand52fad80207b6a1.33040579 [2]
=&GT; RN001-13 [Rn_No] =&gt; RN001-13 [3] =&gt;
2014-02-10 [Surg_Date] =&gt; 2014-02-10 [4] =&gt; 015405 [ScrubNurse] =&gt;
015405 [5] =&gt; C [SNRole] =&gt; C [6] =&gt; Azhari Landut [ScrubNurseName] =&gt;爱资哈里
Landut)
警告:mysql_fetch_array()要求参数1为资源,字符串在第470行的C:\ xampp \ htdocs \ cotds3 \ editpt_surgery2.php中给出
答案 0 :(得分:0)
在行中($ row3 = mysql_fetch_array($ query3)){?它应该是拼写错误($ row3 = mysql_fetch_array($ result3)){?