PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 10-26-2005, 05:22 PM   #1
noel
Orange Mole
 
Join Date: Aug 2005
Posts: 44
Error Mysql

Hello,
I have this error when I try the spider in shell command :

<b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/home/httpd/vhosts/mysitename.com/httpdocs/google/admin/robot_functions.php</b> on line <b>1357</b><br />

What I 'm wrong

Thank You

Noël
noel is offline   Reply With Quote
Old 10-26-2005, 11:40 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Assuming you are using PhpDig 1.8.8 RC1, the relevant code is the following, but nothing in this code itself seems to indicate the problem.
Code:
          $key = addslashes($key);
          //if keyword exists, retrieve id, else insert it
          $requete = "SELECT key_id FROM ".PHPDIG_DB_PREFIX."keywords WHERE keyword = '".$key."'";
          $result_insert = mysql_query($requete,$id_connect);
          $num = mysql_num_rows($result_insert);
Try changing:
Code:
          $result_insert = mysql_query($requete,$id_connect);
To the following:
Code:
          $result_insert = mysql_query($requete,$id_connect) or die(mysql_error());
And see what prints onscreen.

If you upgraded from PhpDig 1.8.7 to PhpDig 1.8.8 RC1, there is an UPGRADE.txt instruction file that comes with the PhpDig 1.8.8 RC1 package.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-30-2005, 04:56 PM   #3
noel
Orange Mole
 
Join Date: Aug 2005
Posts: 44
Ok work fine, but in order I haven't the error (die) do you think the informations are put in the database , whiout problems ?
noel is offline   Reply With Quote
Old 11-01-2005, 03:41 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
If the MySQL query dies, then whatever happened before death went into the tables. Once death occurs, nothing happens. The die(mysql_error()) in the second post is working on a SELECT query, so it's doubtful that you'd encounter problems.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL smallint(6)... Maskime Mod Submissions 0 03-28-2008 06:52 AM
MySQL Question jackpod How-to Forum 1 09-21-2006 08:30 PM
PhpDig only with Mysql vodevil How-to Forum 8 04-30-2005 05:16 PM
MySQL version? jmitchell Coding & Tutorials 1 02-01-2005 11:09 AM
MySQL Connections druesome Troubleshooting 4 10-10-2003 12:18 AM


All times are GMT -8. The time now is 09:36 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.