|
|
Home";
// if a category is found
} else {
echo "Home > ";
$result = mysql_query("SELECT trail FROM $maintable WHERE link LIKE '%$parsedurl%'") or die('Query failed: ' . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($line as $col_value) {
echo "\t\t $col_value\n";
}
}
}
// selects from the database SUB TRAIL only if it contains the correct url
$res = mysql_query("SELECT * FROM $subtable WHERE link LIKE '%$parsedurl%'");
$re = mysql_fetch_array($res);
// if no category found
if(mysql_num_rows($res) == 0) {
echo "";
// Performing SQL query
$result = mysql_query("SELECT trail FROM $subtable WHERE link LIKE '%$parsedurl%'") or die('Query failed: ' . mysql_error());
// Printing results
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($line as $col_value) {
echo "\t\t $col_value\n";
}
}
// if a category is found
} else {
echo " >";
$result = mysql_query("SELECT trail FROM $subtable WHERE link LIKE '%$parsedurl%'") or die('Query failed: ' . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($line as $col_value) {
echo "\t\t $col_value\n";
}
}
}
?> |
|
|