NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Php/mysql error

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-02-2005, 01:59 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Apr 2005
Location: England
Posts: 159
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, 02:04 PM   #2 (permalink)
Senior Member
 
Porte's Avatar
Join Date: May 2005
Location: I'm right here
Posts: 3,526
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.
__________________
WP Theme Developer
Your One-stop for Premium Magazine/CMS WordPress Themes
Deluxe Themes
Porte is offline  
Old 07-02-2005, 02:33 PM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Apr 2005
Location: England
Posts: 159
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'");

????: NamePros.com http://www.namepros.com/programming/103631-php-mysql-error.html
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, 03:10 PM   #4 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie 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, 03:26 PM THREAD STARTER               #5 (permalink)
NamePros Member
Join Date: Apr 2005
Location: England
Posts: 159
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, 03:42 PM   #6 (permalink)
Pro Coder & Designer
 
aween's Avatar
Join Date: Apr 2005
Location: Netherlands
Posts: 967
aween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really nice
 



upload your file
and rename it to

file1.phps


and then post the url
__________________
aween web development
aween is offline  
Old 07-02-2005, 04:03 PM   #7 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
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 ()); 
????: NamePros.com http://www.namepros.com/showthread.php?t=103631
deadserious is offline  
Old 07-02-2005, 04:50 PM   #8 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie 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, 06:13 PM THREAD STARTER               #9 (permalink)
NamePros Member
Join Date: Apr 2005
Location: England
Posts: 159
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, 02:11 AM   #10 (permalink)
New Member
Join Date: Jul 2005
Posts: 8
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, 02:40 AM   #11 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



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, 02:47 AM   #12 (permalink)
New Member
Join Date: Jul 2005
Posts: 8
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
????: NamePros.com http://www.namepros.com/showthread.php?t=103631
    
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 02:54 AM.
val539 is offline  
Old 07-03-2005, 08:31 AM THREAD STARTER               #13 (permalink)
NamePros Member
Join Date: Apr 2005
Location: England
Posts: 159
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, 08:41 AM   #14 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie 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


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

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:37 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger