Warning ,i can not solving in PHP code
Posted
by user318068
on Stack Overflow
See other posts from Stack Overflow
or by user318068
Published on 2010-05-21T22:18:53Z
Indexed on
2010/05/21
22:20 UTC
Read the original article
Hit count: 167
hi , in code there Warning
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\xampp\htdocs\Join.php on line 69
but i can not solving where exactly >>
can you help me where the error in this code .
<?php
51. include("connect.php");
53. $email = mysql_query("select MemberEmail from members where MemberID= '$id' ");
54. while ($row = mysql_fetch_array($email))
55. {
57. $memEmail=$row['MemberEmail'];
}
62. $sql = mysql_query("select * from ninvite where recieverMemberEmail ='$memEmail' and viwed= '0' order by RoomID desc");
64. $num =mysql_num_rows($sql);
67. if ($sql and $num >0 )
{
69. while($row=mysql_fetch_array($sql))
{
71. $sender=$row['SenderMemberID'];
73. $room=$row['RoomID'];
77. $sql2 =mysql_query("select MemberName from members where MemberID ='$sender' ");
78. $sql1 =mysql_query("select RoomName,RoomLogo from rooms where RoomID ='$room' ");
79. while($row=mysql_fetch_array($sql2))
{
$mem =$row['MemberName'];
}
84. while($rows=mysql_fetch_array($sql1))
{
$Ro =$rows['RoomName'];
$logo = $rows['RoomLogo'];
}
89. ?>
Thanks alot
© Stack Overflow or respective owner