I have created the following PHP file, and I cannot get the results to return corrrectly. The echo command is returning a value of 1. I have run the query manually from the PHP console, and it returns the correct value. I figure I made a dumb mistake or I am not connecting the DB correctly becuase if I manually add the value at the end of the http line it shows correctly. Here is my code for the query:
PHP Code:
<?php
function fetch_team_schedule_id($schedule_id)
{
error_reporting(E_ALL & ~E_NOTICE);
global $db, $vba_options, $vbulletin, $vbphrase;
$scheduleid = $db->query("
SELECT teamid
FROM " . TABLE_PREFIX . "fbschedule
INNER JOIN " . TABLE_PREFIX . "style
WHERE fbschedule.teamname=style.title AND fbschedule.teamname='Iowa Style'
");
}
$remote_schedule_file = file_get_contents("http://www.website.com/schedule.php?id={$scheduleid['teamid']}");
$xml = new SimpleXMLElement($remote_schedule_file);
echo (print $remote_schedule_file)
?>