 |
ต้องการจะเรียกข้อมูลจาก phpMyadmin ไปที่หน้า html อะครับ มันเออเร่อตงไหนช่วยดูที |
|
 |
|
|
 |
 |
|
นั่นผม เขียนผิด เอง ครับ ตรงอื่น มีไหมครับ -*- จริงๆกะเขียน from ครับ
ผิดตรงอื่นมีไหมครับ
|
 |
 |
 |
 |
Date :
2009-12-23 12:08:54 |
By :
Hello World |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
@$db = mysql_connect ("localhost","root","")
mysql_select_db ("neonetsoft"); //เออเร่อตรงนี้อะครับแต่ ชื่อดาต้าเบสผมถูกนะครับ
$sql = "select * from joe_dailymessage";
$query= mysql_query($sql);
while($rows=mysql_fetch_row($query)){
foreach($rows as $row)
{
if ($NameProgram == 1)
echo "<tr><td>".mosFormat($row->NameProgram) . "</td>";
else
echo "<tr>";
}
}
ทำตามนี้แล้วครับแต่มันเออเร่ออยู่ดีตรงช่วง
|
 |
 |
 |
 |
Date :
2009-12-23 13:24:40 |
By :
Hello World |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
@$db = mysql_connect ("localhost","root","") or die(mysql_error());
mysql_select_db ("neonetsoft") or die(mysql_error());
..
query= mysql_query($sql) or die(mysql_error());
ลองให้โค้ดแสดงผล error มาก่อนครับ จะได้มองเห็นภาพออกว่าเป็นอะไร
|
 |
 |
 |
 |
Date :
2009-12-23 13:37:34 |
By :
xbeginner01 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
while($rows=mysql_fetch_assoc($query)){
|
 |
 |
 |
 |
Date :
2009-12-23 13:40:21 |
By :
ความรู้เท่าหางอึ่ง |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
@$db = mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("neonetsoft")or die(mysql_error());
$sql = "select * from joe_dailymessage";
$query = mysql_query($sql);
while($rows = mysql_fetch_row($query)){
foreach($rows as $row)
{
if($NameProgram == 1)
echo "<tr><td>" . mosFormatDate($row->NameProgram) . "</td>";
else
echo "<tr>";
}
}
-------
error แบบนี้ครับ
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\joomla1515\components\com_dailymessage\dailymessage.php on line 37
|
 |
 |
 |
 |
Date :
2009-12-23 13:51:44 |
By :
Hello World |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Table 'neonetsoft.joe_dailymessage' doesn't exist
แต่ ดาต้าเบสผมชื่อ neonetsoft เทเบิลชื่อ joe_dailymessage มันถูกแล้วนะครับ
ใครพอจะทราบไหมครับว่ามาจากสาเหตุอะไร
|
 |
 |
 |
 |
Date :
2009-12-23 13:56:35 |
By :
Hello World |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|