PDA

View Full Version : Problem :( HELP!



мϊкэ
14-07-2005, 04:01 PM
my news system worked perfectly fine yesterday right but now its stopped working :'( i get this error on show_news.php


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xenigmac/public_html/members/news/show_news.php on line 5

here is lines 1 - 7 on show_news.php


<?
include("db.php");//the database connection file
$getnews = mysql_query("SELECT * FROM extreme_news ORDER BY id DESC");

while($r=mysql_fetch_array($getnews)){
extract($r);



and here is the mysql query


CREATE TABLE `extreme_news` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`user` varchar(22) NOT NULL default '',
`date` varchar(50) NOT NULL default '0000-00-00',
`message` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1;

what is wrong :@

splintercell!
14-07-2005, 04:06 PM
while($r = mysql_fetch_array($getnews)){

could be that... not sure.. but if it worked yesterday it will be a problem with the database..

Tomm
14-07-2005, 04:21 PM
try rebooting server via your servers control panel

мϊкэ
14-07-2005, 04:28 PM
something strange was happening when i was viewing the page on its not in an include it was fine but viewing it on an include wouldnt work without the full url for some reason :s but it works now, i just want to add a few things to the stats box now, is there a code which can display how many files there are in a certain directory?

splintercell!
14-07-2005, 05:08 PM
Doubt it could be something in php try phpfreaks.com =]

Want to hide these adverts? Register an account for free!