Hi,
The following code is throwing the error described in the title when trying to insert rss items. From what I understand the $mysqli variable needs to be set to global (in looking through other threads) however this is not working. $mysqli is defined elsewhere and the database connection works fine. The error is on the last line of code below:
for($x=0;$x<$limit;$x++) {
global $mysqli;
$item_title = str_replace(' & ', ' & ', $feed[$x]['title']);
$item_id = md5($item_title);
$item_url = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$item_date = date('l F d, Y', strtotime($feed[$x]['date']));
$fetch_date = date("Y-m-j G:i:s");
echo '<p><strong><a href="'.$link.'" title="'.$title.'">'.$item_title.'</a></strong><br />';
echo '<small><em>Posted on '.$item_date.'</em></small></p>';
//echo '<p>'.$description.'</p>';
$item_exists_sql = "SELECT item_id FROM rssingest where item_id = '" . $item_id . "'";
$result = $mysqli->query($item_exists_sql) or die($mysqli->error.__LINE__);
Thanks for your help.
G