PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (http://www.phpdig.net/forum/showthread.php?t=237)

ullone 11-23-2003 10:57 AM

Pardon my stupidity. I'm a newbie.

Database dig - Tabella tempspider in esecuzione su localhost

file text
id mediumint(11) auto_increment
level tinyint(6)
path text
site_id mediumint(9)
indexed tinyint(1)
upddate timestamp(14)
error tinyint(1)

For spider.php i have downloaded the latest version in your site. It is the same of download. I have not changed nothing in spider.php.

If you try in localhost to install in this mode (in Plesk without a separate installation of phpmyadmin i need to read sql and then to make the update) i think that you have the same error with repubblica.it.
I have only created the database and read the sql. Then i have installed with install.php and used update option in admin install.php . For the moment i have this error only with this url. Now i try other address.

Other error are not present.

http://www.eulisse.com/phpdig/index.php

Charter 11-23-2003 11:17 AM

If you go to the HTML source at repubblica.it, you will see things like the following:
Code:

sthome.html\        (note the \ after html)
It is the \ that is causing the problem because it is escaping a ' needed in the query string. Fix forthcoming...

ullone 11-23-2003 11:29 AM

I think that a part the error the index procedure is o.k.. In search engine of my site if a write "repubblica" i have many result. I think that the spider do not forget nothing. It is also an anti estetic error. Pardon my english. I'm italian.
However. I like this search engine.

Charter 11-23-2003 11:29 AM

Hi. Here's a fix.

In spider.php find:
PHP Code:

$query "SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."tempspider WHERE path like '".str_replace("'",'',$lien['path'])."' AND file like '".str_replace("'",'',$lien['file'])."' AND site_id='$site_id'"

and right before it add:
PHP Code:

if (!get_magic_quotes_runtime()) {
    
$lien['path'] = addslashes($lien['path']);
    
$lien['file'] = addslashes($lien['file']);


Again, in spider.php find:
PHP Code:

$query "SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."tempspider WHERE path like '".str_replace("'",'',$lien['path'])."' AND file like '".str_replace("'",'',$lien['file'])."' AND site_id='$site_id'"

and replace with:
PHP Code:

$query "SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."tempspider WHERE path like '".$lien['path']."' AND file like '".$lien['file']."' AND site_id='$site_id'"

Also, in spider.php find:
PHP Code:

$query "SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."spider WHERE path like '".str_replace("'",'',$lien['path'])."' AND file like '".str_replace("'",'',$lien['file'])."' AND site_id='$site_id' $andmore"

and replace with:
PHP Code:

$query "SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."spider WHERE path like '".$lien['path']."' AND file like '".$lien['file']."' AND site_id='$site_id' $andmore"

Remember to remove any "word" wrapping in the above code.

motopsycho 05-18-2004 01:39 PM

Just received same error
 
Hello,
I just received a similar error but I am using verion 1.8 and it already has these fixes in place.

Thanks


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

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