Dimava
Wed 5th Jun '02, 3:55pm
<?php
// Important! You have to include it before your html code
include_once "/home/virtual/site3/fst/var/www/html/poll/poll_cookie.php";
?>
<html>
<head>
<title>Welcome to NXSupport</title>
</head>
<?php
include("templates/header.htm");
require("admins/config.php");
$link = mysql_pconnect( "localhost", $user, $pass );
mysql_select_db( $db, $link );
include("templates/index/index_start.php");
$result = mysql_query("SELECT * FROM news ORDER BY date DESC, id DESC LIMIT 5");
while(list($id,$title,$date,$username,$description ,$source,$image) = mysql_fetch_row($result)){
$newdate2 = chunk_split($date, 2, '.');
$newdate = substr($newdate2, 0, strlen($newdate2)-1);
$description = substr($description, 0, 500);
include("templates/index/news_template.php");
}
include("templates/index/index_end.php");
mysql_close($link);
include("templates/footer.htm");
?>
</body>
</html>
Time to time I get an error on this line: while(list($id,$title,$date,$username,$description ,$source,$image) = mysql_fetch_row($result)){ and it says that its some invalid query or something, but after about 30 seconds it goes away. The server is using php 4.1.2
The funny thing is that it only happens once in a while, next time I get the error i'll post the exact message that it gives me. It'll load the whole page, but it'll show the error instead of what ever's in the loop
thanks
Dimava
// Important! You have to include it before your html code
include_once "/home/virtual/site3/fst/var/www/html/poll/poll_cookie.php";
?>
<html>
<head>
<title>Welcome to NXSupport</title>
</head>
<?php
include("templates/header.htm");
require("admins/config.php");
$link = mysql_pconnect( "localhost", $user, $pass );
mysql_select_db( $db, $link );
include("templates/index/index_start.php");
$result = mysql_query("SELECT * FROM news ORDER BY date DESC, id DESC LIMIT 5");
while(list($id,$title,$date,$username,$description ,$source,$image) = mysql_fetch_row($result)){
$newdate2 = chunk_split($date, 2, '.');
$newdate = substr($newdate2, 0, strlen($newdate2)-1);
$description = substr($description, 0, 500);
include("templates/index/news_template.php");
}
include("templates/index/index_end.php");
mysql_close($link);
include("templates/footer.htm");
?>
</body>
</html>
Time to time I get an error on this line: while(list($id,$title,$date,$username,$description ,$source,$image) = mysql_fetch_row($result)){ and it says that its some invalid query or something, but after about 30 seconds it goes away. The server is using php 4.1.2
The funny thing is that it only happens once in a while, next time I get the error i'll post the exact message that it gives me. It'll load the whole page, but it'll show the error instead of what ever's in the loop
thanks
Dimava