Zurück   WordPress Deutschland Forum > Support > Plugins und Widgets

Antwort
 
Themen-Optionen Ansicht
Alt 26.06.2008, 14:14   #1 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
MySQL Fehler / Feeds in Kategorien

Immer wieder auftretende Fehler:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/geilerbl/public_html/wordpress/wp-content/plugins/pc-rss-import/pcrssimport.php on line 188

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/geilerbl/public_html/wordpress/wp-content/plugins/pc-rss-import/pcrssimport.php on line 188

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/geilerbl/public_html/wordpress/wp-content/plugins/pc-rss-import/pcrssimport.php on line 188

was heisst das?
Timo1983 ist offline   Mit Zitat antworten
Alt 26.06.2008, 14:16   #2 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
Hier die Zeilen:

// only continue, if the guid does not exist
if(mysql_num_rows($numExisting) <= 0) {
// does not exist - import it
$this->importItem($singleItem, $feedData->cat_ID);
Timo1983 ist offline   Mit Zitat antworten
Alt 26.06.2008, 14:53   #3 (permalink)
WPD-Moderator
 
Benutzerbild von marX
 
Registriert seit: 05.10.2006
Beiträge: 7.317
Die Fehlermeldung besagt, dass du keine gültige MySQL-Resource zurückbekommen hast, d.h. kein Ergebnis. Wahrscheinlich wurde dort "false" zurückgeliefert, aufgrund einer fehlgeschlagenen SQL-Anfrage. Interessant ist also, was $numExisting enthält, d.h. wo es (zuletzt) gesetzt wurde.
marX ist offline   Mit Zitat antworten
Alt 26.06.2008, 14:57   #4 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
Ja zuletzt gesetzt in Zeile 188:

if(mysql_num_rows($numExisting) <= 0) {
Timo1983 ist offline   Mit Zitat antworten
Alt 26.06.2008, 15:14   #5 (permalink)
WPD-Moderator
 
Benutzerbild von marX
 
Registriert seit: 05.10.2006
Beiträge: 7.317
Da wird eine Funktion drauf angewendet (die schief geht). Ich meinte die Zeile in der steht
PHP-Code:
$numExisting = <Ausdruck
marX ist offline   Mit Zitat antworten
Alt 26.06.2008, 15:22   #6 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
179 bis 190:

// fetch the feed
$fetchedFeed = $this->fetchFeed($feedData->rss_source);

// loop through all elements
foreach($fetchedFeed->get_items() AS $singleItem) {
// check if the post already exists
$numExisting = mysql_query("select id from {$table_prefix}posts where guid='".db_escape($singleItem->get_id())."'");

// only continue, if the guid does not exist
if(mysql_num_rows($numExisting) <= 0) {
// does not exist - import it
$this->importItem($singleItem, $feedData->cat_ID);
Timo1983 ist offline   Mit Zitat antworten
Alt 26.06.2008, 16:05   #7 (permalink)
WPD-Moderator
 
Benutzerbild von marX
 
Registriert seit: 05.10.2006
Beiträge: 7.317
Zitat:
Zitat von Timo1983 Beitrag anzeigen
$numExisting = mysql_query("select id from {$table_prefix}posts where guid='".db_escape($singleItem->get_id())."'");
Hier muss irgendwas falsch sein. Änder die Zeile bitte mal wie folgt:
PHP-Code:
$query "select id from {$table_prefix}posts where guid='".db_escape($singleItem->get_id())."'";
echo 
"<pre>$query\n\n";
$numExisting mysql_query$query );
var_dump($numExisting);
echo 
'</pre>'
und poste mal den Output.
marX ist offline   Mit Zitat antworten
Alt 26.06.2008, 16:15   #8 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
Nach Änderung komtm da jetzt:

bool(false)

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/geilerbl/public_html/wordpress/wp-content/plugins/pc-rss-import/pcrssimport.php on line 191

In der Zeile steht:

190-193:

// only continue, if the guid does not exist
if(mysql_num_rows($numExisting) <= 0) {
// does not exist - import it
$this->importItem($singleItem, $feedData->cat_ID);


Timo1983 ist offline   Mit Zitat antworten
Alt 26.06.2008, 16:26   #9 (permalink)
WPD-Moderator
 
Benutzerbild von marX
 
Registriert seit: 05.10.2006
Beiträge: 7.317
Mmh, warum wird da die Query nicht mit ausgegeben... oder hast du nur vergessen die zu posten? Egal, bau das mal zurück (also meine echo's und das var_dump() entfernen), und ändere die jetzige Zeile 191 wie folgt:
PHP-Code:
if( $numExisting === false ) { 
marX ist offline   Mit Zitat antworten
Alt 26.06.2008, 16:37   #10 (permalink)
PostRank: 2
 
Registriert seit: 18.04.2008
Beiträge: 66
Ja jetztz kann der gesamte Blog nich mehr aufgerufen werden mit den Fehler:

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/geilerbl/public_html/wordpress/wp-content/plugins/pc-rss-import/pcrssimport.php on line 759

Die Zeilen sagen:

// new instance
$cRssImport = & new RSSImport();



Timo1983 ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist aus.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:51 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 | Impressum | Ein Inpsyde.com Projekt