Hi ya guys, first time here, and I think I'm going to have a great time here, as I have already read some of the threads and seems most people here are vary helpful.
Anyway here is what is going on. I have a bit of code that is not working right, naturally.
<?
include("sql.php");
$sql = "SELECT * FROM misc ORDER BY `misc`.`id` DESC ";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
$sql2 = "SELECT * FROM `misctype` ORDER BY `misctype`.`id` DESC ";
$result2 = mysql_query($sql2);
while($row7 = mysql_fetch_row($result2)){
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>";
}
While this dose not give me any syntax errors or sql errors it only allows the array data to be the first row of the $sql2 query, at least, at far as I can tell with some echo debugging.
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.