[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 07-02-2005, 12:59 PM   #1 (permalink)
NamePros Member
 
Join Date: Apr 2005
Location: England
Posts: 115
31.00 NP$ (Donate)

resolva is an unknown quantity at this point


Php/mysql error

Hello everyone; just posting because i have an error on my website that i cant get rid of:

What does this error mean and how can i get rid of it?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xcs/public_html/functions/challengeforfeit.php on line 178
resolva is offline  
Old 07-02-2005, 01:04 PM   #2 (permalink)
Senior Member
 
Porte's Avatar
 
Join Date: May 2005
Location: Somewhere on earth!
Posts: 3,528
21.30 NP$ (Donate)

Porte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud of


Please open this page and get the code around that line, or we could not know where the problem reside. Also make sure that all tables correctly exist in database.
__________________
Custom WordPress theme design. Top notch free WordPress themes
Custom Theme Design
Porte is offline  
Old 07-02-2005, 01:33 PM   #3 (permalink)
NamePros Member
 
Join Date: Apr 2005
Location: England
Posts: 115
31.00 NP$ (Donate)

resolva is an unknown quantity at this point


ok here is where in the code i think it is...


//NEXT 2 FUNCTIONS DELETES AND AWARDS WINS FOR UNRESPONDED OR UNFINALIZED CHALLENGES

LINE 178 - function check_unrespondedchallenges(){




$challengeladders=mysql_query("SELECT id,respondhours,finalizehours FROM ladders WHERE challenge='1'");

while(list($id,$respondhours,$finalizehours)=mysql _fetch_row($challengeladders)){



$laterespond=date("Y-m-d H:i:s",time()-60*60*$respondhours);

$latefinalize=date("Y-m-d H:i:s",time()-60*60*$finalizehours);



$challengeinfo=mysql_query("SELECT challid,challenger,challenged,ladderid,challengerr ank,challengedrank,respondedby,finalizedby FROM challenges WHERE

ladderid='$id' AND respondedby='0' AND finalizedby='0' AND challengedtime < '$laterespond' OR

ladderid='$id' AND respondedby > '0' AND finalizedby='0' AND respondedtime < '$latefinalize'");

while(list($challid,$challenger,$challenged,$ladde rid,$challengerrank,$challengedrank,$respondedby,$ finalizedby)=mysql_fetch_row($challengeinfo)){
resolva is offline  
Old 07-02-2005, 02:10 PM   #4 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


do you have anything in your table?
PoorDoggie is offline  
Old 07-02-2005, 02:26 PM   #5 (permalink)
NamePros Member
 
Join Date: Apr 2005
Location: England
Posts: 115
31.00 NP$ (Donate)

resolva is an unknown quantity at this point


I have many db tables. but i dont know what the table should be called?

What should it be called in the table/db?
resolva is offline  
Old 07-02-2005, 02:42 PM   #6 (permalink)
Pro Coder & Designer
 
xlusive's Avatar
 
Join Date: Apr 2005
Location: Netherlands
Posts: 964
101.50 NP$ (Donate)

xlusive is just really nicexlusive is just really nicexlusive is just really nicexlusive is just really nicexlusive is just really nice


upload your file
and rename it to

file1.phps


and then post the url
__________________
Online Dragonball Game
xlusive is offline  
Old 07-02-2005, 03:03 PM   #7 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


You might also want to try using mysql_error() to see if it spits out any more detailed errors.

Example:

PHP Code:
$challengeladders = mysql_query("SELECT id,respondhours,finalizehours FROM ladders WHERE challenge='1'") or die (mysql_error ());
deadserious is offline  
Old 07-02-2005, 03:50 PM   #8 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


open, in php_my_admin, the table "ladders" in browse mode. Is there any data in there? That could be your problem. It was the same error for me, when I didn't have anything in my table!
PoorDoggie is offline  
Old 07-02-2005, 05:13 PM   #9 (permalink)
NamePros Member
 
Join Date: Apr 2005
Location: England
Posts: 115
31.00 NP$ (Donate)

resolva is an unknown quantity at this point


Still no luck, the mysql_error didnt give me anymore information

here is the link with the actually script on anyway for you to have a look at

Code

Thank You
resolva is offline  
Old 07-03-2005, 01:11 AM   #10 (permalink)
New Member
 
Join Date: Jul 2005
Posts: 8
12.00 NP$ (Donate)

val539 is an unknown quantity at this point


i add 8 lines
u shoud readd the lines u removed
Regards
Attached Files
File Type: zip resolva.zip (2.1 KB, 1 views)
val539 is offline  
Old 07-03-2005, 01:40 AM   #11 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


Quote:
Originally Posted by resolva
Still no luck, the mysql_error didnt give me anymore information

here is the link with the actually script on anyway for you to have a look at

Code

Thank You
did you check your table? I am not being funny, I had that exact same error when I was trying to read from an empty table. If there was something wrong with your syntax then the mysql error would be saying that "there is somethign wrong with your syntax". If it was a mistype then you would have a php error, and not a mysql error.
PoorDoggie is offline  
Old 07-03-2005, 01:47 AM   #12 (permalink)
New Member
 
Join Date: Jul 2005
Posts: 8
12.00 NP$ (Donate)

val539 is an unknown quantity at this point


sorry i change the post because for any reason
the code is changed
PHP Code:
    $numbers_challengeladders=array(); //line Valerie
    
$numbers_challengeladders=@mysql_fetch_row($challengeladders); //line Valerie
    
if (count($numbers_challengeladders)>0) { //line Valerie
challengeladders BECOMES challe ngeladders, in 2nd line, (bug vbulletin )
see the attachment file it's better
Regards

Last edited by val539; 07-03-2005 at 01:54 AM.
val539 is offline  
Old 07-03-2005, 07:31 AM   #13 (permalink)
NamePros Member
 
Join Date: Apr 2005
Location: England
Posts: 115
31.00 NP$ (Donate)

resolva is an unknown quantity at this point


Thanx for all your help

Got rid of the error, thanx again
resolva is offline  
Old 07-03-2005, 07:41 AM   #14 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


good! what was wrong?
PoorDoggie is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected $ efriese Programming 4 06-28-2005 04:55 AM
NP error message redhippo The Break Room 2 02-08-2005 04:07 AM
Custom Error Pages - HELM & FrontPage together on Windows Server? Cosmos75 Web Design Discussion 2 08-03-2004 01:43 PM
NameCheap, again. [ An error occured ] Darren Domain Name Discussion 1 05-31-2004 07:33 PM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 08:51 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85