Hi joomlers,
my web is running on webhosting (siteground.com). In one of many Joomla components is script with DELETE some data from database written in following way:
/* delete data from db-table: */
$database->setQuery("DELETE FROM #__SomeTable WHERE id=".$PassSomeID." AND id_XY=0 AND OtherCode=\"".$PassOtherCode."\"");
$AffectedRows = $database->loadResult();
...
and after performing this command reaches (only on webhosting, not on my localhost) warning:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/myweb/public_html/includes/database.php on line 416
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/myweb/public_html/includes/database.php on line 419
and data is deleted in database.
Mentioned script "database.php" (line 416,419):
function loadResult() {
if (!($cur = $this->query())) {
return null;
}
$ret = null;
if ($row = mysql_fetch_row( $cur )) {
$ret = $row[0];
}
mysql_free_result( $cur );
return $ret;
}
What setting is wrong, if I don't want showing this warning?
FF
Webhosting: warning on delete SQL commnad
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
- FredFlinstone
- Joomla! Apprentice
- Posts: 8
- Joined: Tue Jun 13, 2006 3:05 pm
- Location: Albershausen, Germany
- Contact:
- Hackwar
- Joomla! Apprentice
- Posts: 34
- Joined: Fri Sep 16, 2005 8:41 pm
- Location: NRW - Germany
- Contact:
Re: Webhosting: warning on delete SQL commnad
What kind of result would you want to load with a delete query?
Use $database->Query() instead
Use $database->Query() instead
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.
Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.
Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.