ช่วยดูให้หน่อยนะคะว่าทำไมถึง error พยายามดูจากหลายๆ กระทู้แล้ว แต่ก็ยังเป็นเหมือนเดิม
ต่อกับดาต้าเบสได้แล้ว และ query ก็ไปเอามาจากฐานดาต้าเบสเลย
<?php
require("connectdb.inc.php");
$sql = "SELECT * FROM `user_profile` WHERE user_id=\'5088264\'";
$query=mysql_query($sql);
while($result=mysql_fetch_array($query))
{
echo $result['firstname'];
}
?>
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result reso
Moderators: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26538
- Joined: 22/09/2008 6:18 pm
- Contact:
Re: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result reso
ลองแก้
เป็น
Code: Select all
$sql = "SELECT * FROM `user_profile` WHERE user_id=\'5088264\'";
Code: Select all
$sql = "SELECT * FROM `user_profile` WHERE user_id='5088264' ";
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result reso
by sutawee » 19/01/2013 9:14 pm » in Programming - PHP - 1 Replies
- 2767 Views
-
Last post by mindphp
19/01/2013 9:40 pm
-
-
-
มัน ERROR Warning: mysql_result(): supplied argument is not a valid MySQL result
by boyouina » 22/09/2012 10:42 am » in Programming - PHP - 0 Replies
- 10281 Views
-
Last post by boyouina
22/09/2012 10:42 am
-
-
-
ช่วยด้วยครับ Warning: mysql_fetch_array(): supplied argument is not a valid MySQ
by jo23748 » 20/11/2011 1:08 pm » in Programming - PHP - 1 Replies
- 2187 Views
-
Last post by mindphp
21/11/2011 6:42 pm
-
-
-
mysql_num_rows(): supplied argument is not a valid MySQL result resource
by rangsun6342 » 01/03/2012 1:58 am » in Programming - PHP - 3 Replies
- 7019 Views
-
Last post by webseo2go
17/04/2012 7:21 pm
-
-
-
ช่วยหน่องครับ Warning: mysql_num_rows(): supplied argument is not a valid MySQL
by knzkidz » 28/10/2014 5:35 pm » in Programming - PHP - 7 Replies
- 13185 Views
-
Last post by knzkidz
29/10/2014 8:18 am
-
-
-
ตรวจ code php mysql ให้ทีครับ Warning: mysql_num_rows(): supplied argument is no
by Dwight » 09/12/2011 9:57 am » in Programming - PHP - 6 Replies
- 5298 Views
-
Last post by Dwight
12/12/2011 10:07 pm
-
Who is online
Users browsing this forum: No registered users and 4 guests