Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Domain summit 2024

mysql error

Status
Not open for further replies.

Rockefeller

Level 11
Legacy Exclusive Member
Joined
Apr 8, 2005
Messages
8,011
Reaction score
58
Feedback: 606 / 0 / 1
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?
 

Luc

Old school
Legacy Exclusive Member
Joined
Jul 18, 2002
Messages
1,574
Reaction score
5
Feedback: 9 / 0 / 0
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.
 

katherine

Country hopper
Legacy Exclusive Member
Joined
Jul 9, 2005
Messages
8,428
Reaction score
1,290
Feedback: 65 / 0 / 0
The table structure is still the same ?
 

jdk

DNF Addict
Legacy Exclusive Member
Joined
Jul 23, 2004
Messages
6,347
Reaction score
19
Feedback: 214 / 0 / 0
It is trying to fetch data in the database where the field does not match up or not there.
 

Rockefeller

Level 11
Legacy Exclusive Member
Joined
Apr 8, 2005
Messages
8,011
Reaction score
58
Feedback: 606 / 0 / 1
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:

jdk

DNF Addict
Legacy Exclusive Member
Joined
Jul 23, 2004
Messages
6,347
Reaction score
19
Feedback: 214 / 0 / 0
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.
 

Rockefeller

Level 11
Legacy Exclusive Member
Joined
Apr 8, 2005
Messages
8,011
Reaction score
58
Feedback: 606 / 0 / 1
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.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
MariaBuy

New Threads

Our Mods' Businesses

UrlPick.com
URL Shortener

*the exceptional businesses of our esteemed moderators

Top Bottom