Anyway here is what is going on. I have a bit of code that is not working right, naturally.
Code: Select all
<?php
include("sql.php"); //sql connect and DB select
$sql = "SELECT * FROM misc ORDER BY `misc`.`id` DESC ";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){ //rows from misc video table
$sql2 = "SELECT * FROM `misctype` ORDER BY `misctype`.`id` DESC ";
$result2 = mysql_query($sql2);
while($row7 = mysql_fetch_row($result2)){ //figure out what is the file type and set an array with the resolution and file extension
if(strtolower($row['type']) === strtolower($row2[1])){
$type = array($row2[0],$row2[1],$row2[2],$row2[3],$row2[4]);
}
}
echo "This row type is: ".$type[1]."<br>"; //echo the type of the video (figured you didn't need to see all the row output data ;p
}
?>What I'm trying to do here is have a search result return embedded videos from a misc section where the file types are different and the resolutions are different so I have another table that defines the type, extensions and resolutions for the videos then is associated to the main misc video table, of course all done with a CMS I'm building ;p
If there is any other information you need I'll be happy to offer what I can and any other code that might help.
Thank you for taking the time to look at this.