get current version line
Permalink
Hi
Im using the below code to get data from the btYouTube table but not sure how i select the current version line used. Is there a field on another table I can perhaps inner join on to identify what is current biD being used.
Cheers
Im using the below code to get data from the btYouTube table but not sure how i select the current version line used. Is there a field on another table I can perhaps inner join on to identify what is current biD being used.
Cheers
<?php header("Access-Control-Allow-Origin: *"); header("Content-Type: application/json; charset=UTF-8"); $conn = new mysqli("localhost", "***", "****", "*****"); $result = $conn->query("SELECT title, videoURL FROM btYouTube"); $outp = ""; while($rs = $result->fetch_array(MYSQLI_ASSOC)) { if ($outp != "") {$outp .= ",";} $outp .= '{"Title":"' . $rs["title"] . '",'; $outp .= '"URL":"'. preg_replace("(^https://youtu.be/)", "", $rs["videoURL"]) . '"}'; } $outp ='{"records":['.$outp.']}'; $conn->close(); echo($outp); ?>
Hi Andy
yes using angularjs which takes the information from the php page and populates the you tube video as well as title.
Current version is the line in the table that is actually being used and ignore other lines which are previous version updates if that makes sense.
yes using angularjs which takes the information from the php page and populates the you tube video as well as title.
Current version is the line in the table that is actually being used and ignore other lines which are previous version updates if that makes sense.
Hi,
if you have the collectionID you can use the collectionVersionBlocks table to get the bIDs of blocks on that page. Once you have that you can get the record from the Youtube table or by narrowing down first via the blockTypes table.
if you have the collectionID you can use the collectionVersionBlocks table to get the bIDs of blocks on that page. Once you have that you can get the record from the Youtube table or by narrowing down first via the blockTypes table.
Are you attempting to get a youtube URL from the youtube block's table but are doing so from a non-concrete5 website on the same server?
What do you mean 'get the current version line used' - if I'm being dim please just ignore my questions as appropriate.