So i'm a bit of a newbie having trouble with this sql query. I have a form in the cms that allows a user to input a vimeo video ID and then pass that to the vimeo moogaloop api.
So i've written a query the writes some xml to the head of the current videopage
$query = (int)DB::query("SELECT VimeoID FROM `VideoPage`WHERE `ID` = '$this->ID'")->value();
for some reason it keeps returning the value as 0. Any thoughts are appreciated.
peace,
dan.
$result = mysql_query($query);
$doc = new DomDocument('1.0');
// create root node
$root = $doc->createElement('vimeoURL');
$root = $doc->appendChild($root);
// add node for each row
$occ = $doc->createElement('vimeoURL');
$occ = $root->appendChild($occ);
$child = $doc->createElement('URL');
$child = $occ->appendChild($child);
$value = $doc->createTextNode('URL' + $result);
$value = $child->appendChild($value);
$xml_string = $doc->saveXML();
//header('Content-Type: application/xml; charset=ISO-8859-1');
echo $xml_string;