• Welcome to DNForum.com - Domain Investor Forum, Free Domain Marketplace and a community for 45+ domain pros
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

mysql error

Status
Not open for further replies.

Rockefeller

New Member
Legacy Exclusive Member
Joined
Apr 8, 2005
Messages
8,011
Reaction score
58
I am putting together a picture rating site...anyway, I had everything tweaked the way I wanted it..and then... i accidentally deleted the mysql database...i went ahead and re-added another database with the same name, user and password but still receive this error:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/closing1/public_html/pimpsleds.com/index.php on line 451

Warning: Cannot modify header information - headers already sent by (output started at /home/closing1/public_html/pimpsleds.com/index.php:451) in /home/closing1/public_html/pimpsleds.com/index.php on line 79

Anyone know whats happening?
 
It would help if you posted the source, or at least the line in question so we can see if the problem is with the mysql syntax.

But from the looks of it, it seems like the result set (ex: $rid = mysql_fetch_array) contains no results (is null).

This could be for the following reasons:

1. The user you're connecting with may not have READ/WRITE permissions to the DB. If you accidentally dropped the DB, the privileges could be dropped as well.
2. The mysql statement is bad, add "print mysql_error();" after the mysql call to see if mysql returns an error.

Good luck,
Luc L.
 
The table structure is still the same ?
 
It is trying to fetch data in the database where the field does not match up or not there.
 
Line 451
Code:
if ($r = mysql_fetch_array($query)) {

Line 79
Code:
header("Location: http://".$_SERVER["HTTP_HOST"]."/index-rval=".mt_rand().".html");

And for the CRON JOB update emails I get:

Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in home/closing1/public_html/pimpsleds.com/cronjobs/approve.reject.php on line 85

Line 85:
Code:
if ($r = mysql_fetch_array($query))

Is there any possible way to clear this up without having to reinstall the entire site?
 
Last edited:
Justin-

There should be a line that says $query=' stuff here ';

What you need to do is make sure the table data it is trying to grab matches the table fields in your database.

This is something easily fixed without having to install everything.
 
Thanks jdk, I sent you a PM. I guess the problem is that I don't know how to fix that
 
Status
Not open for further replies.
Back
Top Bottom