הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   בעיה בקוד שהכנתי (https://hosts.co.il/forums/showthread.php?t=17894)

בונדי 16-03-06 21:08

בעיה בקוד שהכנתי
 
בעיה בקוד בעע רושם לי תשגיאה הבאה :
http://bodego.loads.ws/index.php

הקןד :
PHP קוד:

<?
include "config.php";

     
$sqlquery="SELECT * FROM topics";
     
$theresult=@mysql_query($sqlquery,$con);
?>






<html>
<meta name="generator" content="Namo WebEditor(Trial)">
<body>
<table border="1" width="25%">
<tr>
<td align="center"><b>נושא ההודעה</b></td>
<td align="center"><b>נשלח בתאריך</b></td>
</tr>

<?
while ($recordeset=@mysql_fetch_array($theresult))
{
     echo 
"<tr>";
     echo 
"<td><a href=view.php?id=".$recordeset["id"].">".$recordeset["title"]."</a></td>";
     echo 
"<td><center>".$recordeset["date"]."</center></td>";
     echo 
"</tr>";
}
?>
</TABLE>
<?php mysql_close($con);?>
</body>
</html>


בניה 16-03-06 21:34

לש"ש


בטח יש שגיאה בשאילתה.
תוסיף or die mysql error...

TAsraf 16-03-06 22:58

PHP קוד:

<? 
include "config.php"

     
$sqlquery="SELECT * FROM topics"
     
$theresult=@mysql_query($sqlquery,$con); 
?> 






<html> 
<meta name="generator" content="Namo WebEditor(Trial)"> 
<body> 
<table border="1" width="25%"> 
<tr> 
<td align="center"><b>נושא ההודעה</b></td> 
<td align="center"><b>נשלח בתאריך</b></td> 
</tr> 

<? 
while ($recordeset=@mysql_fetch_array($theresult)) 

     echo 
"<tr>"
     echo 
"<td><a href=view.php?id=".$recordeset["id"].">".$recordeset["title"]."</a></td>"
     echo 
"<td><center>".$recordeset["date"]."</center></td>"
     echo 
"</tr>"

?> 
</TABLE> 
<?php 
mysql_close
();
?> 
</body> 
</html>

תנסה את זה

בונדי 17-03-06 00:32

זה לא רושם שגיאה אבל גם לא מציג :S
http://bodego.loads.ws/index.php

שקד 18-03-06 16:29

תנסה להוסיף את זה בסוף השאילתה שלך
PHP קוד:

 or die (mysql_error()); 

ותוריד את כל ה-"@" זה מבריח שגיאות ..
ואז אתה תיראה את השגיאה ותוכל לטפל בה !
בהצלחה :)


כל הזמנים הם GMT +2. הזמן כעת הוא 07:14.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ